diff options
| author | Marin Ivanov <[email protected]> | 2024-08-21 10:53:39 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2024-08-21 10:53:39 +0300 |
| commit | 3f2637916505a1e09a0d997017a5dc41596e66da (patch) | |
| tree | 235b953111a8fe85c7a2f257775f7b03a54ebe24 /app.js | |
| parent | a9ba463ba6d32d45ff01ccc0adc4122414e64a60 (diff) | |
add reset configuration
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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)])), |
