fix(phase26): skip netwatch AP scan when clients connected (BUG-01)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user