Page MenuHomePhorge

No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/src/stores/local_config.js b/src/stores/local_config.js
index bcf3b1c87e..0cceef5a2e 100644
--- a/src/stores/local_config.js
+++ b/src/stores/local_config.js
@@ -1,50 +1,50 @@
import { cloneDeep, set } from 'lodash'
import { defineStore } from 'pinia'
import { toRaw } from 'vue'
import { useInstanceStore } from 'src/stores/instance'
import { defaultState as configDefaultState } from 'src/modules/default_config_state'
export const defaultState = {
prefsStorage: {
...configDefaultState,
},
tempStorage: {
...configDefaultState
}
}
export const useLocalConfigStore = defineStore('local_config', {
state() {
return cloneDeep(defaultState)
},
actions: {
set({ path, value }) {
set(this.prefsStorage, path, value)
},
setTemporarily({ path, value }) {
set(this.tempStorage, path, value)
},
unsetTemporarily({ path, value }) {
set(this.tempStorage, path, undefined)
},
unset({ path, value }) {
set(this.prefsStorage, path, undefined)
},
clearSyncConfig() {
const blankState = { ...cloneDeep(defaultState) }
Object.keys(this).forEach((k) => {
this.prefsStorage[k] = blankState[k]
})
},
},
persist: {
afterLoad(state) {
return {
- prefStorage: state.prefsStorage,
+ prefsStorage: state.prefsStorage,
tempStorage: { ...configDefaultState },
}
},
},
})

File Metadata

Mime Type
text/x-diff
Expires
Thu, Jun 4, 6:38 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1539159
Default Alt Text
(1 KB)

Event Timeline