forked from AkkomaGang/akkoma-fe
pre-emptively wipe serverside settings on logout
This commit is contained in:
parent
f4b36a9ebf
commit
39909c8a85
1 changed files with 8 additions and 0 deletions
|
@ -55,6 +55,11 @@ const serverSideConfig = {
|
||||||
wipeServerSideOption (state, { name }) {
|
wipeServerSideOption (state, { name }) {
|
||||||
set(state, name, null)
|
set(state, name, null)
|
||||||
},
|
},
|
||||||
|
wipeAllServerSideOptions (state) {
|
||||||
|
Object.keys(settingsMapGet).forEach(key => {
|
||||||
|
set(state, key, null)
|
||||||
|
})
|
||||||
|
},
|
||||||
// Set the settings based on their path location
|
// Set the settings based on their path location
|
||||||
setCurrentUser (state, user) {
|
setCurrentUser (state, user) {
|
||||||
Object.entries(settingsMapGet).forEach(([name, path]) => {
|
Object.entries(settingsMapGet).forEach(([name, path]) => {
|
||||||
|
@ -104,6 +109,9 @@ const serverSideConfig = {
|
||||||
console.warn('Error setting server-side option:', e)
|
console.warn('Error setting server-side option:', e)
|
||||||
commit('confirmServerSideOption', { name, value: oldValue })
|
commit('confirmServerSideOption', { name, value: oldValue })
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
logout ({ commit }) {
|
||||||
|
commit('wipeAllServerSideOptions')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue