mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
fix open chat functionality after relog co-authored-by: Ogerly <https://github.com/ogerly>
This commit is contained in:
parent
073adbe48c
commit
dd4e6bf2dc
@ -37,7 +37,7 @@ describe('default.vue', () => {
|
||||
getters: {
|
||||
'auth/isLoggedIn': () => true,
|
||||
'chat/showChat': () => {
|
||||
return { showChat: false, roomID: 'u0' }
|
||||
return { showChat: false, roomID: null }
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<div v-if="$store.getters['chat/showChat'].showChat" class="chat-modul">
|
||||
<ds-text align="right" class="close">
|
||||
RoomID: {{ $store.getters['chat/showChat'].roomID }}
|
||||
<ds-button @click="$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: 'u0' })">
|
||||
<ds-button @click="$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: null })">
|
||||
x
|
||||
</ds-button>
|
||||
</ds-text>
|
||||
@ -41,6 +41,9 @@ export default {
|
||||
ChatModule,
|
||||
},
|
||||
mixins: [seo, mobile()],
|
||||
beforeCreate() {
|
||||
this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: null })
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
export const state = () => {
|
||||
return {
|
||||
showChat: false,
|
||||
roomID: 'u0',
|
||||
roomID: null,
|
||||
}
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
SET_OPEN_CHAT(state, ctx) {
|
||||
state.showChat = ctx.showChat || false
|
||||
state.roomID = ctx.roomID || 'u0'
|
||||
state.roomID = ctx.roomID || null
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user