proper temporary setting + fix appearance stuff using stale data
This commit is contained in:
parent
1f57fab6ae
commit
ae17911560
2 changed files with 9 additions and 8 deletions
|
|
@ -251,11 +251,11 @@ export default {
|
|||
return (k, v) =>
|
||||
this.$store.dispatch('pushAdminSetting', { path: k, value: v })
|
||||
default:
|
||||
return (originalPath, value) => {
|
||||
const path = `simple.${originalPath}`
|
||||
return (readPath, value) => {
|
||||
const writePath = `simple.${readPath}`
|
||||
|
||||
if (!this.timedApplyMode) {
|
||||
useSyncConfigStore().setPreference({ path, value })
|
||||
useSyncConfigStore().setPreference({ path: writePath, value })
|
||||
useSyncConfigStore().pushSyncConfig()
|
||||
} else {
|
||||
if (useInterfaceStore().temporaryChangesTimeoutId !== null) {
|
||||
|
|
@ -263,8 +263,9 @@ export default {
|
|||
return
|
||||
}
|
||||
|
||||
useSyncConfigStore().setPreference({ path, value })
|
||||
const oldValue = get(this.configSource, path)
|
||||
const oldValue = get(this.configSource, readPath)
|
||||
|
||||
useSyncConfigStore().setPreference({ path: writePath, value })
|
||||
|
||||
const confirm = () => {
|
||||
useSyncConfigStore().pushSyncConfig()
|
||||
|
|
@ -272,7 +273,7 @@ export default {
|
|||
}
|
||||
|
||||
const revert = () => {
|
||||
useSyncConfigStore().setPreference({ path, value: oldValue })
|
||||
useSyncConfigStore().setPreference({ path: writePath, value: oldValue })
|
||||
useInterfaceStore().clearTemporaryChanges()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue