Skip to content

Commit

Permalink
use 1 instead of true for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Jan 6, 2024
1 parent b8881b3 commit 2f99645
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
12 changes: 4 additions & 8 deletions client/src/components/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}
}
Expand Down
10 changes: 3 additions & 7 deletions client/src/store/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
})

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f99645

Please sign in to comment.