Static HTML fallback

This commit is contained in:
Neo
2026-02-19 12:28:27 +00:00
parent 498e38697c
commit 05b05bc8a5

37
public/index.html Normal file
View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mission Control</title>
<style>
body { background: #000; color: #fff; font-family: monospace; padding: 20px; margin: 0; }
h1 { font-size: 18px; margin-bottom: 15px; }
.nav { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 15px; }
.nav button { padding: 8px 12px; background: #222; color: #888; border: none; cursor: pointer; font-size: 11px; }
.nav button.active { background: #f0f; color: #fff; }
pre { background: #111; padding: 15px; border-radius: 8px; overflow: auto; font-size: 10px; max-height: 70vh; }
</style>
</head>
<body>
<h1>MISSION CONTROL</h1>
<div class="nav" id="nav"></div>
<pre id="out">Loading...</pre>
<script>
var tabs = ['tasks','crons','server','backups','agents','whatsapp','memory'];
var cur = 'tasks';
function rn() {
document.getElementById('nav').innerHTML = tabs.map(function(t){
return '<button class="'+(t===cur?'active':'')+'" onclick="ld(\''+t+'\')">'+t+'</button>';
}).join('');
}
function ld(t) {
cur = t; rn();
document.getElementById('out').textContent = 'Loading...';
fetch('/api/data?type='+t).then(function(r){return r.json();}).then(function(d){
document.getElementById('out').textContent = JSON.stringify(d,null,2);
})["catch"](function(e){document.getElementById('out').textContent = 'Error: '+e.message;});
}
rn(); ld('tasks');
</script>
</body>
</html>