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 | |
| parent | a9ba463ba6d32d45ff01ccc0adc4122414e64a60 (diff) | |
add reset configuration
| -rw-r--r-- | app.js | 6 | ||||
| -rw-r--r-- | style.css | 1 |
2 files changed, 7 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)])), @@ -82,6 +82,7 @@ input[type=submit], button { height: 40px; border:0; color:#fff; + margin: 10px; } input[type=submit]:active, button:active { |
