Moved buttons to wifi.html

modified:   data/www/index.html
	modified:   data/www/wifi.html
This commit is contained in:
2025-04-13 20:33:15 +02:00
parent 777640b7df
commit 3031f75836
2 changed files with 32 additions and 21 deletions

View File

@@ -34,9 +34,7 @@
overflow-y: auto;
}
.danger-zone {
margin-top: auto;
padding: 20px;
border-top: 1px solid #34495e;
display: none; /* Hide the danger zone since it's no longer needed */
}
.danger-btn {
background: #e74c3c;
@@ -59,11 +57,6 @@
<div class="menu-item" data-page="wifi">WiFi Settings</div>
<div class="menu-item" data-page="midi">MIDI Config</div>
<div class="menu-item" data-page="system">System</div>
<div class="danger-zone">
<h4>Danger Zone</h4>
<button class="danger-btn" onclick="factoryReset()">Factory Reset</button>
</div>
</div>
<div class="content" id="mainContent">
<iframe id="contentFrame" style="width:100%;height:100%;border:none;"></iframe>
@@ -86,15 +79,6 @@
});
});
function factoryReset() {
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));
}
}
// Load dashboard by default
document.getElementById('contentFrame').src = pages.dashboard;
</script>