backend notifications implementation

This commit is contained in:
Čarodej
2022-03-10 11:49:02 +01:00
parent 70d7f2f5bd
commit 64e80d387b
20 changed files with 617 additions and 280 deletions
+10
View File
@@ -5,6 +5,8 @@ import router from '../../router'
const defaultState = {
isVisibleNavigationBars: localStorage.getItem('is_navigation_bars') !== 'false',
isVisibleNotificationCenter: false,
notificationCount: 0,
isDarkMode: false,
isVisibleSidebar: localStorage.getItem('file_info_visibility') === 'true' || false,
itemViewType: localStorage.getItem('preview_type') || 'list',
@@ -167,10 +169,18 @@ const mutations = {
UPDATE_DARK_MODE_STATUS(state, val) {
state.isDarkMode = val
},
UPDATE_NOTIFICATION_COUNT(state, val) {
state.notificationCount = val
},
TOGGLE_NOTIFICATION_CENTER(state) {
state.isVisibleNotificationCenter = !state.isVisibleNotificationCenter
},
}
const getters = {
isVisibleNotificationCenter: (state) => state.isVisibleNotificationCenter,
isVisibleNavigationBars: (state) => state.isVisibleNavigationBars,
notificationCount: (state) => state.notificationCount,
isVisibleSidebar: (state) => state.isVisibleSidebar,
itemViewType: (state) => state.itemViewType,
requestedPlan: (state) => state.requestedPlan,