Remove unneeded view

This commit is contained in:
Oliver-Akins 2020-09-27 16:16:14 -06:00
parent 6b8c918310
commit b34d1df374

View file

@ -1,78 +0,0 @@
<template>
<div id="websocket_entry">
<h1>
Secret Hitler Online
</h1>
<h3>Very Secret, Much Hitler, Wow Online!</h3>
<p>
Please enter a websocket URL:
</p>
<input
type="text"
name="Websocket URL"
:class="has_error ? 'error' : ''"
v-model="ws_uri"
@change.stop="has_error = false"
@keyup.enter="submit_ws_uri()"
>
<br>
<button
@click.stop="submit_ws_uri()"
>
Confirm URL
</button>
</div>
</template>
<script>
export default {
name: 'WebsocketEntry',
components: {},
data() {return {
ws_uri: ``,
has_error: false,
ws_regex: /^(wss?|https?):\/\//,
}},
methods: {
submit_ws_uri() {
if (this.ws_uri.length > 0 && this.ws_uri.match(this.ws_regex)) {
this.$emit(`try-ws-uri`, this.ws_uri);
} else {
this.has_error = true;
alert(`Invalid websocket URL, please check that you typed it correctly.`)
}
},
},
}
</script>
<style lang="stylus">
@import "../theme.styl"
#websocket_entry {
text-align: center
margin: 0 auto
height: 100vh
width: 50vw
color: $main-text-colour
h1, h3 {
letter-spacing: $title-letter-spacing
}
p {
letter-spacing: $body-letter-spacing
}
@media screen and (max-width: 600px) {
width: 90vw
}
}
</style>
<style lang="stylus" scoped>
@import "../theme.styl"
input[type="text"] {
margin-bottom: 10px
}
</style>