fix import/export
This commit is contained in:
parent
195e353b3a
commit
d881b92f86
5 changed files with 46 additions and 7 deletions
|
|
@ -18,7 +18,10 @@ import { toRaw } from 'vue'
|
|||
import { CURRENT_UPDATE_COUNTER } from 'src/components/update_notification/update_notification.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import {
|
||||
LOCAL_ONLY_KEYS,
|
||||
useLocalConfigStore,
|
||||
} from 'src/stores/local_config.js'
|
||||
|
||||
import { storage } from 'src/lib/storage.js'
|
||||
import {
|
||||
|
|
@ -35,7 +38,6 @@ export const COMMAND_TRIM_FLAGS = 1000
|
|||
export const COMMAND_TRIM_FLAGS_AND_RESET = 1001
|
||||
export const COMMAND_WIPE_JOURNAL = 1010
|
||||
export const COMMAND_WIPE_JOURNAL_AND_STORAGE = 1011
|
||||
const LOCAL_ONLY_KEYS = new Set(Object.keys(defaultConfigLocal))
|
||||
|
||||
export const defaultState = {
|
||||
// do we need to update data on server?
|
||||
|
|
@ -739,6 +741,16 @@ export const useSyncConfigStore = defineStore('sync_config', {
|
|||
)
|
||||
return result
|
||||
},
|
||||
mergedConfigWithoutDefaults: (state) => {
|
||||
const localPrefs = useLocalConfigStore().prefsStorage
|
||||
const result = Object.fromEntries(
|
||||
Object.entries(state.prefsStorage.simple).map(([k, value]) => [
|
||||
k,
|
||||
LOCAL_ONLY_KEYS.has(k) ? localPrefs[k] : value,
|
||||
]),
|
||||
)
|
||||
return result
|
||||
},
|
||||
},
|
||||
persist: {
|
||||
afterLoad(state) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue