From 777640b7df9cba746f133b339dafd4eeb48ef6e7 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 13 Apr 2025 12:40:07 +0200 Subject: [PATCH] modified: data/www/index.html modified: data/www/wifi.html --- data/www/index.html | 24 ++-------------------- data/www/wifi.html | 49 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/data/www/index.html b/data/www/index.html index 6c44a6b..6034838 100644 --- a/data/www/index.html +++ b/data/www/index.html @@ -62,8 +62,6 @@

Danger Zone

- -
@@ -88,27 +86,9 @@ }); }); - function resetWiFi() { - if(confirm('Are you sure you want to reset all WiFi settings?')) { - fetch('/api/wifi/reset', { method: 'POST' }) - .then(response => response.json()) - .then(data => alert(data.message)) - .catch(error => alert('Error: ' + error)); - } - } - - function forgetNetwork() { - if(confirm('Are you sure you want to forget the current WiFi network?')) { - fetch('/api/wifi/forget', { method: 'POST' }) - .then(response => response.json()) - .then(data => alert(data.message)) - .catch(error => alert('Error: ' + error)); - } - } - function factoryReset() { - if(confirm('WARNING: This will reset all settings to factory defaults. Are you sure?')) { - fetch('/api/system/reset', { method: 'POST' }) + if(confirm('Are you sure you want to perform a factory reset? This will erase all settings.')) { + fetch('/api/system/factory-reset', { method: 'POST' }) .then(response => response.json()) .then(data => alert(data.message)) .catch(error => alert('Error: ' + error)); diff --git a/data/www/wifi.html b/data/www/wifi.html index 48aa681..05b72b3 100644 --- a/data/www/wifi.html +++ b/data/www/wifi.html @@ -20,6 +20,25 @@ .status-disconnected { color: #c0392b; } + .danger-zone { + margin-top: 30px; + padding: 20px; + border: 2px solid #e74c3c; + border-radius: 5px; + } + .danger-btn { + background: #e74c3c; + color: white; + border: none; + padding: 10px 15px; + border-radius: 4px; + cursor: pointer; + width: 100%; + margin: 5px 0; + } + .danger-btn:hover { + background: #c0392b; + } @@ -29,6 +48,12 @@

Current Status

+ +
+

WiFi Controls

+ + +