Archived
2
0

use 1 instead of true for consistency.

This commit is contained in:
Miroslav Šedivý 2024-01-06 17:33:39 +01:00
parent b8881b3a46
commit 2f9964580f
3 changed files with 9 additions and 17 deletions

View File

@ -83,16 +83,12 @@
this.$i18n.locale = default_lang
}
const show_side = new URL(location.href).searchParams.get('show_side')
if (show_side && show_side === 'true') {
this.$accessor.client.showSide()
} else if (show_side && show_side === 'false') {
this.$accessor.client.hideSide()
if (show_side !== null) {
this.$accessor.client.setSide(show_side === '1')
}
const mute_chat = new URL(location.href).searchParams.get('mute_chat')
if (mute_chat && mute_chat === 'true') {
this.$accessor.settings.setSound(false)
} else if (mute_chat && mute_chat === 'false') {
this.$accessor.settings.setSound(true)
if (mute_chat !== null) {
this.$accessor.settings.setSound(mute_chat !== '1')
}
}
}

View File

@ -27,13 +27,9 @@ export const mutations = mutationTree(state, {
state.side = !state.side
set('side', state.side)
},
showSide(state) {
state.side = true
set('side', state.side)
},
hideSide(state) {
state.side = false
set('side', state.side)
setSide(state, side: boolean) {
state.side = side
set('side', side)
},
})

View File

@ -257,8 +257,8 @@ NEKO_BROADCAST_PIPELINE: "flvmux name=mux ! rtmpsink location={url} pulsesrc dev
- Adding `?embed=1` will hide most additional components and show only video.
- Adding `?volume=<0-1>` will set volume to given value.
- Adding `?lang=<language>` will set language to given value.
- Adding `?show_side=true` will show the sidebar on startup.
- Adding `?mute_chat=true` will mute the chat on startup.
- Adding `?show_side=1` will show the sidebar on startup.
- Adding `?mute_chat=1` will mute the chat on startup.
- e.g. `http(s)://<URL:Port>/?pwd=neko&usr=guest&cast=1`
### Screen size