fix(phase26): skip netwatch AP scan when clients connected (BUG-01)

This commit is contained in:
Mathieu Moran
2026-08-11 03:11:13 -04:00
parent f9d967e71c
commit 89bbc4fdb8
3 changed files with 71 additions and 0 deletions
+23
View File
@@ -248,6 +248,29 @@ async function loadUplinkStatus() {
const status = await response.json();
if (!response.ok) throw new Error(status.error || `HTTP ${response.status}`);
uplinkStatus.textContent = describeUplink(status);
// In-car access card
const hotspotInfo = document.getElementById('in-car-hotspot-info');
const wifiInfo = document.getElementById('in-car-wifi-info');
const disconnectedInfo = document.getElementById('in-car-disconnected-info');
const hotspotUrl = document.getElementById('hotspot-url');
const copyBtn = document.getElementById('copy-hotspot-url');
if (status.mode === 'local_hotspot') {
const ip = status.ip_address || '10.42.0.1';
hotspotUrl.textContent = `http://${ip}`;
hotspotInfo.hidden = false;
wifiInfo.hidden = true;
disconnectedInfo.hidden = true;
if (copyBtn) copyBtn.onclick = () => navigator.clipboard.writeText(`http://${ip}`);
} else if (status.mode === 'wifi' || status.mode === 'phone') {
hotspotInfo.hidden = true;
wifiInfo.hidden = false;
disconnectedInfo.hidden = true;
} else {
hotspotInfo.hidden = true;
wifiInfo.hidden = true;
disconnectedInfo.hidden = false;
}
const phoneAddress = status.mode === 'phone'
? status.ip_address
: status.last_transition && status.last_transition.last_phone_ip;