modified: data/www/index.html

modified:   data/www/wifi.html
This commit is contained in:
2025-04-13 12:40:07 +02:00
parent 1080d3025c
commit 777640b7df
2 changed files with 51 additions and 22 deletions

View File

@@ -62,8 +62,6 @@
<div class="danger-zone">
<h4>Danger Zone</h4>
<button class="danger-btn" onclick="resetWiFi()">Reset WiFi Settings</button>
<button class="danger-btn" onclick="forgetNetwork()">Forget Current Network</button>
<button class="danger-btn" onclick="factoryReset()">Factory Reset</button>
</div>
</div>
@@ -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));