mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
some more tweaks
This commit is contained in:
@ -1 +1 @@
|
||||
NEKO_DEV=localhost:3000
|
||||
VUE_APP_SERVER=localhost:3000
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "1.0.0",
|
||||
"description": "Client for neko streaming server",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve --mode development",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
|
@ -66,13 +66,13 @@
|
||||
<img src="@/assets/logo.svg" alt="n.eko" />
|
||||
<span><b>n</b>.eko</span>
|
||||
</div>
|
||||
<div class="message" v-if="!connecting">
|
||||
<form class="message" v-if="!connecting" @submit.stop.prevent="connect">
|
||||
<span>Please enter the password:</span>
|
||||
<input type="password" v-model="password" />
|
||||
<span class="button" @click.stop.prevent="connect">
|
||||
<button type="submit" class="button" @click.stop.prevent="connect">
|
||||
Connect
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
</form>
|
||||
<div class="spinner" v-if="connecting">
|
||||
<div class="double-bounce1"></div>
|
||||
<div class="double-bounce2"></div>
|
||||
@ -471,7 +471,9 @@
|
||||
|
||||
connect() {
|
||||
this.ws = new WebSocket(
|
||||
process.env.NODE_ENV === 'development' ? `ws://${process.env.NEKO_DEV}/ws?password=${this.password}` : `${/https/gi.test(location.protocol) ? 'wss' : 'ws'}://${location.host}/ws?password=${this.password}` ,
|
||||
process.env.NODE_ENV === 'development'
|
||||
? `ws://${process.env.VUE_APP_SERVER}/ws?password=${this.password}`
|
||||
: `${/https/gi.test(location.protocol) ? 'wss' : 'ws'}://${location.host}/ws?password=${this.password}`,
|
||||
)
|
||||
|
||||
this.ws.onmessage = this.onMessage.bind(this)
|
||||
|
Reference in New Issue
Block a user