summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
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)])),