summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2024-08-21 10:53:39 +0300
committerMarin Ivanov <[email protected]>2024-08-21 10:53:39 +0300
commit3f2637916505a1e09a0d997017a5dc41596e66da (patch)
tree235b953111a8fe85c7a2f257775f7b03a54ebe24 /app.js
parenta9ba463ba6d32d45ff01ccc0adc4122414e64a60 (diff)
add reset configuration
Diffstat (limited to 'app.js')
-rw-r--r--app.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app.js b/app.js
index 3579ca6..bdc4867 100644
--- a/app.js
+++ b/app.js
@@ -60,6 +60,11 @@
}, ok?10000:0);
})
};
+ let setdefaults = (data) => {
+ setLoading(1);
+ cmd("defaults\nsave\n")
+ .finally(() => {setLoading(0);})
+ };
function CErr(text) {
let el = div(
@@ -140,6 +145,7 @@
h1("Controls"),
p(
button("Reboot").$click(reboot),
+ button("Reset Configuration").$click(setdefaults),
).$cls("center"),
),
...fromEntries(entries(config.sections).map(([id, _]) => [`/${id}`, () => CSettings(id)])),