logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 39909c8a8590e866082da5d2528b4df2898f2bf5
parent f4b36a9ebf99cc69ab93c148e488401daf3713b7
Author: Henry Jameson <me@hjkos.com>
Date:   Mon, 28 Feb 2022 18:17:13 +0200

pre-emptively wipe serverside settings on logout

Diffstat:

Msrc/modules/serverSideConfig.js8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/modules/serverSideConfig.js b/src/modules/serverSideConfig.js @@ -55,6 +55,11 @@ const serverSideConfig = { wipeServerSideOption (state, { name }) { set(state, name, null) }, + wipeAllServerSideOptions (state) { + Object.keys(settingsMapGet).forEach(key => { + set(state, key, null) + }) + }, // Set the settings based on their path location setCurrentUser (state, user) { Object.entries(settingsMapGet).forEach(([name, path]) => { @@ -104,6 +109,9 @@ const serverSideConfig = { console.warn('Error setting server-side option:', e) commit('confirmServerSideOption', { name, value: oldValue }) }) + }, + logout ({ commit }) { + commit('wipeAllServerSideOptions') } } }