mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-04-03 16:15:36 +00:00
29 lines
536 B
JavaScript
29 lines
536 B
JavaScript
export const state = () => {
|
|
return {
|
|
showChat: false,
|
|
chatUserId: null,
|
|
groupId: null,
|
|
unreadRoomCount: 0,
|
|
}
|
|
}
|
|
|
|
export const mutations = {
|
|
SET_OPEN_CHAT(state, ctx) {
|
|
state.showChat = ctx.showChat || false
|
|
state.chatUserId = ctx.chatUserId || null
|
|
state.groupId = ctx.groupId || null
|
|
},
|
|
UPDATE_ROOM_COUNT(state, count) {
|
|
state.unreadRoomCount = count
|
|
},
|
|
}
|
|
|
|
export const getters = {
|
|
showChat(state) {
|
|
return state
|
|
},
|
|
unreadRoomCount(state) {
|
|
return state.unreadRoomCount
|
|
},
|
|
}
|