mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
set URL from query.
This commit is contained in:
parent
a1860d5f56
commit
80e5277fb6
@ -94,7 +94,12 @@
|
|||||||
export default class extends Vue {
|
export default class extends Vue {
|
||||||
@Prop() readonly neko!: Neko
|
@Prop() readonly neko!: Neko
|
||||||
|
|
||||||
url: string = location.href
|
@Watch('neko.state.connection.url')
|
||||||
|
updateUrl(url: string) {
|
||||||
|
this.url = url
|
||||||
|
}
|
||||||
|
|
||||||
|
url: string = ''
|
||||||
|
|
||||||
async setUrl() {
|
async setUrl() {
|
||||||
if (this.url == '') {
|
if (this.url == '') {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<neko-header :neko="neko" @toggle="expanded = !expanded" />
|
<neko-header :neko="neko" @toggle="expanded = !expanded" />
|
||||||
</div>
|
</div>
|
||||||
<div class="video-container">
|
<div class="video-container">
|
||||||
<neko-canvas ref="neko" autologin autoconnect autoplay />
|
<neko-canvas ref="neko" :server="server" autologin autoconnect autoplay />
|
||||||
<div v-if="loaded && neko.private_mode_enabled" class="player-notif">Private mode is currently enabled.</div>
|
<div v-if="loaded && neko.private_mode_enabled" class="player-notif">Private mode is currently enabled.</div>
|
||||||
<div
|
<div
|
||||||
v-if="loaded && neko.state.connection.type === 'webrtc' && !neko.state.video.playing"
|
v-if="loaded && neko.state.connection.type === 'webrtc' && !neko.state.video.playing"
|
||||||
@ -366,6 +366,8 @@
|
|||||||
loaded: boolean = false
|
loaded: boolean = false
|
||||||
tab: string = ''
|
tab: string = ''
|
||||||
|
|
||||||
|
server: string = location.href
|
||||||
|
|
||||||
uploadActive = false
|
uploadActive = false
|
||||||
uploadProgress = 0
|
uploadProgress = 0
|
||||||
|
|
||||||
@ -399,6 +401,12 @@
|
|||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
window.neko = this.neko
|
window.neko = this.neko
|
||||||
|
|
||||||
|
// initial URL
|
||||||
|
const url = new URL(location.href).searchParams.get('url')
|
||||||
|
if (url) {
|
||||||
|
this.server = url
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// connection events
|
// connection events
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user