diff --git a/dashboard/static/index.html b/dashboard/static/index.html index ee93d1e..5f34ff8 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -26,10 +26,7 @@

SNEK Dashboard

Live Sens'it uplink decoding

-
- - connecting -
+ @@ -156,7 +153,6 @@ function renderDevices() {
${badge(d.mode || 'Unknown', modeTone(d.mode))} ${d.format ? badge(d.format.replace('sensit_','').toUpperCase(), 'slate') : ''} - ${d.button_alert ? badge('button', 'blue') : ''}
@@ -247,17 +243,14 @@ async function bootstrap() { function setConn(state) { const dot = document.getElementById('conn-dot'); - const txt = document.getElementById('conn-text'); - const bg = document.getElementById('conn-badge'); const map = { - live: ['bg-emerald-500', 'live', 'bg-emerald-50 text-emerald-700 border-emerald-200'], - off: ['bg-rose-500', 'reconnecting', 'bg-rose-50 text-rose-700 border-rose-200'], - idle: ['bg-slate-400', 'connecting', 'bg-slate-100 text-slate-600 border-slate-200'], + live: ['bg-emerald-500', 'connected'], + off: ['bg-rose-500', 'disconnected'], + idle: ['bg-slate-300', 'connecting'], }; - const [d, t, b] = map[state] || map.idle; - dot.className = `w-1.5 h-1.5 rounded-full ${d}`; - txt.textContent = t; - bg.className = `inline-flex items-center gap-2 text-xs px-2.5 py-1 rounded-md border w-fit ${b}`; + const [color, title] = map[state] || map.idle; + dot.className = `w-2 h-2 rounded-full ${color}`; + dot.title = title; } function connectSSE() {