Archived
2
0

add parameter for chat mute and show side

This commit is contained in:
mbattista 2024-01-06 15:02:13 +01:00
parent 4d023df692
commit 355c0eac0d
2 changed files with 20 additions and 0 deletions

View File

@ -82,6 +82,18 @@
if (default_lang && this.langs.includes(default_lang)) { if (default_lang && this.langs.includes(default_lang)) {
this.$i18n.locale = 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> </script>

View File

@ -27,6 +27,14 @@ export const mutations = mutationTree(state, {
state.side = !state.side state.side = !state.side
set('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 }, {}) export const actions = actionTree({ state, getters, mutations }, {})