ability to pin items in navigation menu, initial draft version

This commit is contained in:
Henry Jameson 2022-08-11 14:30:58 +03:00
commit 6df9913354
9 changed files with 221 additions and 146 deletions

View file

@ -23,6 +23,9 @@ export const defaultState = {
_journal: [],
simple: {
dontShowUpdateNotifs: false
},
collections: {
pinnedNavItems: ['home', 'dms', 'chats', 'about']
}
},
// raw data
@ -274,8 +277,8 @@ export const mutations = {
totalFlags = _resetFlags(totalFlags)
recent.flagStorage = totalFlags
recent.prefsStorage = totalPrefs
recent.flagStorage = { ...flagsTemplate, ...totalFlags }
recent.prefsStorage = { ...defaultState.prefsStorage, ...totalPrefs }
state.dirty = dirty || needsUpload
state.cache = recent
@ -320,7 +323,7 @@ export const mutations = {
return
}
const collection = new Set(get(state.prefsStorage, path))
collection.remove(value)
collection.delete(value)
set(state.prefsStorage, path, collection)
state.prefsStorage._journal = [
...state.prefsStorage._journal,