fix: show correct 'reach the Pi' URL per uplink mode + BUG-15

- Settings: when the Pi is on the phone's hotspot (mode phone), show the
  Pi's hotspot IP (http://<ip>) with an LTE-only hint instead of the AP URL
- BUG-15 documents the phone dual-role routing loop (host hotspot + connect
  to AP simultaneously breaks the uplink)
This commit is contained in:
Mathieu Moran
2026-08-12 22:38:31 -04:00
parent 51417abf75
commit 7f6d6c3a89
3 changed files with 42 additions and 3 deletions
+15 -2
View File
@@ -302,22 +302,35 @@ async function loadUplinkStatus() {
// In-car access card
const hotspotInfo = document.getElementById('in-car-hotspot-info');
const phoneInfo = document.getElementById('in-car-phone-info');
const wifiInfo = document.getElementById('in-car-wifi-info');
const disconnectedInfo = document.getElementById('in-car-disconnected-info');
const hotspotUrl = document.getElementById('hotspot-url');
const phoneUrl = document.getElementById('phone-url');
const copyBtn = document.getElementById('copy-hotspot-url');
if (status.ap_active && status.ap_ip) {
const copyPhoneBtn = document.getElementById('copy-phone-url');
if (status.mode === 'phone' && status.ip_address) {
phoneUrl.textContent = `http://${status.ip_address}`;
hotspotInfo.hidden = true;
phoneInfo.hidden = false;
wifiInfo.hidden = true;
disconnectedInfo.hidden = true;
if (copyPhoneBtn) copyPhoneBtn.onclick = () => navigator.clipboard.writeText(`http://${status.ip_address}`);
} else if (status.ap_active && status.ap_ip) {
hotspotUrl.textContent = `http://${status.ap_ip}`;
hotspotInfo.hidden = false;
phoneInfo.hidden = true;
wifiInfo.hidden = true;
disconnectedInfo.hidden = true;
if (copyBtn) copyBtn.onclick = () => navigator.clipboard.writeText(`http://${status.ap_ip}`);
} else if (status.mode === 'wifi' || status.mode === 'phone') {
} else if (status.mode === 'wifi') {
hotspotInfo.hidden = true;
phoneInfo.hidden = true;
wifiInfo.hidden = false;
disconnectedInfo.hidden = true;
} else {
hotspotInfo.hidden = true;
phoneInfo.hidden = true;
wifiInfo.hidden = true;
disconnectedInfo.hidden = false;
}