mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
backend notifications implementation
This commit is contained in:
8
resources/js/store/modules/userAuth.js
vendored
8
resources/js/store/modules/userAuth.js
vendored
@@ -18,6 +18,7 @@ const actions = {
|
||||
resolve(response)
|
||||
|
||||
commit('RETRIEVE_USER', response.data)
|
||||
commit('UPDATE_NOTIFICATION_COUNT', response.data.data.relationships.unreadNotifications.data.length)
|
||||
|
||||
if (! getters.isRunningConnection) {
|
||||
dispatch('runConnection')
|
||||
@@ -172,6 +173,13 @@ const mutations = {
|
||||
}
|
||||
})
|
||||
},
|
||||
PUSH_NEW_NOTIFICATION(state, notification) {
|
||||
state.user.data.relationships.unreadNotifications.data.push(notification)
|
||||
},
|
||||
FLUSH_NOTIFICATIONS(state) {
|
||||
state.user.data.relationships.readNotifications.data = []
|
||||
state.user.data.relationships.unreadNotifications.data = []
|
||||
},
|
||||
}
|
||||
|
||||
const getters = {
|
||||
|
||||
Reference in New Issue
Block a user