diff --git a/frontend/src/scripts/config.ts b/frontend/src/scripts/config.ts index c4fd6cf76..5d2704d58 100644 --- a/frontend/src/scripts/config.ts +++ b/frontend/src/scripts/config.ts @@ -1902,10 +1902,8 @@ export function apply( } export function reset(): void { - config = { - ...DefaultConfig, - }; - apply(config); + ConfigEvent.dispatch("fullConfigChange"); + apply(DefaultConfig); saveFullConfigToLocalStorage(); } diff --git a/frontend/src/scripts/pages/settings.ts b/frontend/src/scripts/pages/settings.ts index 5dd5fb262..7999599fa 100644 --- a/frontend/src/scripts/pages/settings.ts +++ b/frontend/src/scripts/pages/settings.ts @@ -1033,6 +1033,10 @@ export function setEventDisabled(value: boolean): void { configEventDisabled = value; } ConfigEvent.subscribe((eventKey) => { + if (eventKey === "fullConfigChange") setEventDisabled(true); + if (eventKey === "fullConfigChangeFinished") { + setEventDisabled(false); + } if (configEventDisabled || eventKey === "saveToLocalStorage") return; if (ActivePage.get() === "settings" && eventKey !== "theme") { update();