new file: .gitignore modified: README.md new file: data/www/dashboard.html new file: data/www/index.html new file: data/www/wifi.html new file: include/README new file: lib/README new file: notes.ods new file: platformio.ini new file: src/NoteMappings copy.h new file: src/NoteMappings.h new file: src/audio_input.cpp new file: src/audio_input.h new file: src/ble.cpp new file: src/ble.h new file: src/config.h new file: src/esp_info.cpp new file: src/esp_info.h new file: src/fft_processing.cpp new file: src/fft_processing.h new file: src/led_control.cpp new file: src/led_control.h new file: src/main.cpp new file: src/midi.cpp new file: src/midi.h new file: src/web_server.cpp new file: src/web_server.h new file: test/README
123 lines
3.9 KiB
HTML
123 lines
3.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Audio2MIDI</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
height: 100vh;
|
|
font-family: Arial, sans-serif;
|
|
}
|
|
.sidemenu {
|
|
width: 250px;
|
|
background: #2c3e50;
|
|
color: white;
|
|
padding: 20px 0;
|
|
}
|
|
.menu-item {
|
|
padding: 15px 25px;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
}
|
|
.menu-item:hover {
|
|
background: #34495e;
|
|
}
|
|
.menu-item.active {
|
|
background: #3498db;
|
|
}
|
|
.content {
|
|
flex: 1;
|
|
padding: 20px;
|
|
background: #f8f9fa;
|
|
overflow-y: auto;
|
|
}
|
|
.danger-zone {
|
|
margin-top: auto;
|
|
padding: 20px;
|
|
border-top: 1px solid #34495e;
|
|
}
|
|
.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;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="sidemenu">
|
|
<div class="menu-item active" data-page="dashboard">Dashboard</div>
|
|
<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="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>
|
|
<div class="content" id="mainContent">
|
|
<iframe id="contentFrame" style="width:100%;height:100%;border:none;"></iframe>
|
|
</div>
|
|
|
|
<script>
|
|
const pages = {
|
|
dashboard: '/dashboard.html',
|
|
wifi: '/wifi.html',
|
|
midi: '/midi.html',
|
|
system: '/system.html'
|
|
};
|
|
|
|
document.querySelectorAll('.menu-item').forEach(item => {
|
|
item.addEventListener('click', () => {
|
|
document.querySelectorAll('.menu-item').forEach(i => i.classList.remove('active'));
|
|
item.classList.add('active');
|
|
const page = item.dataset.page;
|
|
document.getElementById('contentFrame').src = pages[page];
|
|
});
|
|
});
|
|
|
|
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' })
|
|
.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>
|
|
</body>
|
|
</html>
|