This commit is contained in:
Henry Jameson 2026-02-16 16:58:11 +02:00
commit 2e53707324
20 changed files with 115 additions and 99 deletions

View file

@ -417,6 +417,14 @@ export const useSyncConfigStore = defineStore('sync_config', {
this.flagStorage[flag] = value
this.dirty = true
},
setSimplePrefAndSave({ path, value }) {
this.setPreference({ path: `simple.${path}`, value })
this.pushSyncConfig()
},
unsetSimplePrefAndSave({ path }) {
this.unsetPreference({ path: `simple.${path}` })
this.pushSyncConfig()
},
setPreference({ path, value }) {
if (path.startsWith('_')) {
throw new Error(
@ -472,7 +480,7 @@ export const useSyncConfigStore = defineStore('sync_config', {
`Calling unset on depth > 3 (path: ${path}) is not allowed`,
)
}
unset(this.prefsStorage, path, value)
unset(this.prefsStorage, path)
this.prefsStorage._journal = [
...this.prefsStorage._journal,
{ operation: 'unset', path, args: [], timestamp: Date.now() },