Compare commits

..

2 commits

Author SHA1 Message Date
15d17ed35e app: Show pulsing loading dots until first status fetch
Default the status badges to a pulsing "loading" dot instead of the
static offline state, signalling that the data is not yet fetched. The
dots are replaced with their real state on the first /api/status update.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 18:08:27 +09:00
3e66ae200e app: Sync status dots with Ethernet uplink state
Default the Ethernet and hotspot badges to the offline dot and update
the Ethernet dot to active when the uplink is up, so its colour tracks
the actual connection state instead of the initial markup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 18:05:54 +09:00
3 changed files with 13 additions and 5 deletions

View file

@ -286,11 +286,14 @@ function updateStatusDisplay(status) {
// Update Ethernet uplink badge
const ethernetStatus = document.getElementById('ethernetStatus');
const ethernetDot = ethernetStatus.querySelector('.status-dot');
const ethernetText = ethernetStatus.querySelector('.status-text');
if (status.ethernetStatus?.active) {
ethernetDot.className = 'status-dot active';
ethernetText.textContent = `Ethernet · ${status.ethernetStatus.ipv4 || status.ethernetStatus.interface}`;
ethernetStatus.hidden = false;
} else {
ethernetDot.className = 'status-dot offline';
ethernetStatus.hidden = true;
}

View file

@ -22,16 +22,16 @@
</div>
<div class="connection-info">
<div class="status-badge" id="wifiStatus">
<span class="status-dot offline"></span>
<span class="status-text">Disconnected</span>
<span class="status-dot loading"></span>
<span class="status-text">Chargement…</span>
</div>
<div class="status-badge" id="ethernetStatus" hidden>
<span class="status-dot active"></span>
<span class="status-dot loading"></span>
<span class="status-text">Ethernet</span>
</div>
<div class="status-badge" id="hotspotStatus">
<span class="status-dot active"></span>
<span class="status-text">Hotspot actif</span>
<span class="status-dot loading"></span>
<span class="status-text">Chargement…</span>
</div>
</div>
</div>

View file

@ -131,6 +131,11 @@ body {
animation: blink 1.2s ease-in-out infinite;
}
.status-dot.loading {
background: var(--text-tertiary);
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }