diff --git a/static/js/yaris.js b/static/js/yaris.js index b24058d..ae8e90d 100644 --- a/static/js/yaris.js +++ b/static/js/yaris.js @@ -326,3 +326,24 @@ window.setInterval(function () { message.hidden = false; }); }, 30000); + +// ── Phone hotspot banner ─────────────────────────────────────────────────── +(function () { + const banner = document.getElementById('phone-hotspot-banner'); + const ipEl = document.getElementById('phone-hotspot-ip'); + function checkUplink() { + fetch('/api/uplink/status') + .then(r => r.ok ? r.json() : null) + .then(s => { + if (s && s.mode === 'phone' && s.ip_address) { + ipEl.textContent = `http://${s.ip_address}/`; + banner.hidden = false; + } else { + banner.hidden = true; + } + }) + .catch(() => { banner.hidden = true; }); + } + checkUplink(); + window.setInterval(checkUplink, 15000); +})(); diff --git a/templates/index.html b/templates/index.html index 1d7c3c5..5b02963 100644 --- a/templates/index.html +++ b/templates/index.html @@ -9,6 +9,11 @@ {% block content %}

Dashboard

+ + {# ── OBD stat cards ──────────────────────────────────────────────────── #}