work on local-only settings
This commit is contained in:
parent
24be3da17e
commit
449c244d11
6 changed files with 35 additions and 32 deletions
|
|
@ -66,7 +66,7 @@ export const useInterfaceStore = defineStore('interface', {
|
|||
this.temporaryChangesConfirm = confirm
|
||||
this.temporaryChangesRevert = revert
|
||||
const countdownFunc = () => {
|
||||
if (this.temporaryChangesCountdown === 1) {
|
||||
if (this.temporaryChangesCountdown <= 1) {
|
||||
this.temporaryChangesRevert()
|
||||
this.clearTemporaryChanges()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -39,18 +39,6 @@ export const useLocalConfigStore = defineStore('local_config', {
|
|||
})
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
mergedConfig: (state) => {
|
||||
const instancePrefs = useInstanceStore().prefsStorage
|
||||
const result = Object.fromEntries(
|
||||
Object.entries(state.prefsStorage).map(([k, v]) => [
|
||||
k,
|
||||
state.tempStorage[k] ?? v ?? instancePrefs[k],
|
||||
]),
|
||||
)
|
||||
return result
|
||||
},
|
||||
},
|
||||
persist: {
|
||||
afterLoad(state) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -691,10 +691,11 @@ export const useSyncConfigStore = defineStore('sync_config', {
|
|||
mergedConfig: (state) => {
|
||||
const instancePrefs = useInstanceStore().prefsStorage
|
||||
const localPrefs = useLocalConfigStore().prefsStorage
|
||||
const tempPrefs = useLocalConfigStore().tempStorage
|
||||
const result = Object.fromEntries(
|
||||
Object.entries(state.prefsStorage.simple).map(([k, v]) => [
|
||||
k,
|
||||
localPrefs[k] ?? v ?? instancePrefs[k],
|
||||
tempPrefs[k] ?? localPrefs[k] ?? v ?? instancePrefs[k],
|
||||
]),
|
||||
)
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue