Skip to content

Commit

Permalink
add parameter for chat mute and show side
Browse files Browse the repository at this point in the history
  • Loading branch information
mbattista committed Jan 6, 2024
1 parent 4d023df commit 355c0ea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions client/src/components/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
8 changes: 8 additions & 0 deletions client/src/store/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }, {})

0 comments on commit 355c0ea

Please sign in to comment.