add parameter for chat mute and show side
This commit is contained in:
parent
4d023df692
commit
355c0eac0d
@ -82,6 +82,18 @@
|
||||
if (default_lang && this.langs.includes(default_lang)) {
|
||||
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()
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -27,6 +27,14 @@ 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)
|
||||
},
|
||||
})
|
||||
|
||||
export const actions = actionTree({ state, getters, mutations }, {})
|
||||
|
Reference in New Issue
Block a user