diff options
Diffstat (limited to 'src/App.vue')
| -rw-r--r-- | src/App.vue | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/App.vue b/src/App.vue index 1937997..fa8ddcd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -720,20 +720,23 @@ export default defineComponent({ this.resetMode(); this.settingsOpen = true; }, - async onSettingChg(optionType: OptionType, option: string){ + async onSettingChg(optionType: OptionType, option: string, save = true){ // Save in localStorage if (optionType == 'LYT'){ - localStorage.setItem(`${optionType} ${option}`, String(this.lytOpts[option as keyof LayoutOptions])); + if (save){ + localStorage.setItem(`${optionType} ${option}`, String(this.lytOpts[option as keyof LayoutOptions])); + } this.relayoutWithCollapse(); } else if (optionType == 'UI') { - localStorage.setItem(`${optionType} ${option}`, String(this.uiOpts[option as keyof UiOptions])); + if (save){ + localStorage.setItem(`${optionType} ${option}`, String(this.uiOpts[option as keyof UiOptions])); + } if (option == 'useReducedTree'){ this.onTreeChange(); } } else { throw new Error(`Unexpected setting: ${optionType}, ${option}`); } - console.log(`Saved setting: ${optionType}, ${option}`); }, async onTreeChange(){ if (this.activeRoot != this.layoutTree){ |
