Files
corescope-rx/index.html
T
efiten baeed272fc chore: add app version display (semver via Vite inject), set 0.5.0
Shows the running build next to the title. Versioning scheme: patch=fix/tweak,
minor=new backward-compatible feature, major=breaking (e.g. MQTT contract) or
first stable release.
2026-06-10 11:53:44 +02:00

85 lines
4.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>CoreScope RX — coverage capture</title>
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="theme-color" content="#0f1115" />
<link rel="apple-touch-icon" href="/icon-192.png" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<style>
body { font-family: system-ui, sans-serif; margin: 0; padding: 16px; background: #0f1115; color: #e6e6e6; }
h1 { font-size: 18px; }
.card { background: #1a1d24; border: 1px solid #2a2f3a; border-radius: 8px; padding: 12px; margin: 10px 0; }
label { display: block; font-size: 12px; color: #9aa4b2; margin: 6px 0 2px; }
button { width: 100%; padding: 12px; margin-top: 4px; font-size: 15px; border: 0; border-radius: 8px; background: #2ecc71; color: #07120a; font-weight: 600; }
button.danger { background: #e74c3c; color: #fff; }
button:disabled { opacity: .6; }
.btn2 { background: #3b82f6; color: #fff; }
.stats { display: flex; gap: 16px; font-size: 28px; font-weight: 700; }
.stats div { flex: 1; text-align: center; }
.stats small { display: block; font-size: 11px; color: #9aa4b2; font-weight: 400; }
.muted { font-size: 12px; color: #9aa4b2; margin-top: 6px; }
.progress { margin-top: 10px; font: 12px/1.7 ui-monospace, monospace; }
.progress div { color: #9fe6b8; }
.progress div.pending { color: #9aa4b2; }
.progress div.err { color: #ff8b7a; }
.row { display: flex; gap: 8px; }
.row button { flex: 1; }
label.inline { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; color: #e6e6e6; }
label.inline input { width: auto; }
#log { background: #0a0c10; border: 1px solid #2a2f3a; border-radius: 6px; padding: 8px; font: 11px/1.4 ui-monospace, monospace; white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow: auto; color: #9fe6b8; margin-top: 8px; }
.recent { display: flex; flex-direction: column; gap: 4px; }
.rr { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: #11141a; border: 1px solid #2a2f3a; border-radius: 6px; font-size: 13px; }
.rr .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.rr .rk { font-family: ui-monospace, monospace; }
.rr .rname { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr .rsnr { margin-left: auto; font-weight: 600; flex: 0 0 auto; }
.rr .rc { color: #9aa4b2; font-size: 11px; min-width: 34px; text-align: right; }
body { padding-bottom: 70px; }
.bottombar { position: fixed; bottom: 0; left: 0; right: 0; height: 56px; display: flex; background: #1a1d24; border-top: 1px solid #2a2f3a; z-index: 1000; }
.bottombar .tab { flex: 1; background: transparent; color: #9aa4b2; border: 0; border-radius: 0; margin: 0; font-size: 14px; font-weight: 600; }
.bottombar .tab.active { color: #2ecc71; }
#view-map #liveMap { height: calc(100vh - 140px); min-height: 300px; border: 1px solid #2a2f3a; border-radius: 6px; }
</style>
</head>
<body>
<h1>📡 CoreScope RX <span id="appver" style="font-size:11px;font-weight:400;color:#9aa4b2"></span></h1>
<div id="view-home">
<div class="card">
<div class="stats">
<div><span id="heard">0</span><small>nodes heard</small></div>
<div><span id="pending">0</span><small>pending upload</small></div>
<div><span id="gps">…</span><small>gps</small></div>
</div>
</div>
<div class="card">
<button id="btnConnect">Connect companion (BLE)</button>
<div class="progress" id="progress"></div>
<div class="muted" id="companionInfo"></div>
<div class="muted" id="status"></div>
</div>
<div class="card">
<label>Recently heard nodes (latest SNR)</label>
<div id="recent" class="recent"><div class="muted">— nothing yet —</div></div>
<div class="row" style="margin-top:10px">
<button id="btnDbg" class="btn2">Show debug log</button>
<button id="btnClear" class="btn2">Clear log</button>
</div>
<pre id="log" style="display:none"></pre>
</div>
</div><!-- /view-home -->
<div id="view-map" style="display:none">
<label>Live coverage (this session) — hexes persist until you reload</label>
<div id="liveMap"></div>
</div>
<nav class="bottombar">
<button id="tabHome" class="tab active">🏠 Home</button>
<button id="tabMap" class="tab">🗺️ Map</button>
</nav>
<script type="module" src="/src/app.js"></script>
</body>
</html>