app: Surface Ethernet uplink in the UI and gate wpa_supplicant access
When the configured Ethernet interface holds a DHCP-assigned IPv4 at
startup, the app now skips wifi.Initialize / StartEventMonitoring and
guards every wifi.* wrapper against a nil backend. This prevents D-Bus
calls to fi.w1.wpa_supplicant1 from re-activating the daemon via
dbus-activation, honoring the "do nothing" intent of the Ethernet path.
The probed state is exposed in SystemStatus and rendered in the header
as a third pill ("Ethernet · <IP>"); a new "disabled" connectionState
covers the WiFi pill in this mode.
This commit is contained in:
parent
5a3942f351
commit
8b1debdddc
7 changed files with 166 additions and 37 deletions
|
|
@ -273,6 +273,10 @@ function updateStatusDisplay(status) {
|
|||
wifiDot.className = 'status-dot active';
|
||||
wifiText.textContent = `Roaming: ${status.connectedSSID}`;
|
||||
break;
|
||||
case 'disabled':
|
||||
wifiDot.className = 'status-dot offline';
|
||||
wifiText.textContent = 'WiFi désactivé';
|
||||
break;
|
||||
case 'disconnected':
|
||||
default:
|
||||
wifiDot.className = 'status-dot offline';
|
||||
|
|
@ -280,6 +284,16 @@ function updateStatusDisplay(status) {
|
|||
break;
|
||||
}
|
||||
|
||||
// Update Ethernet uplink badge
|
||||
const ethernetStatus = document.getElementById('ethernetStatus');
|
||||
const ethernetText = ethernetStatus.querySelector('.status-text');
|
||||
if (status.ethernetStatus?.active) {
|
||||
ethernetText.textContent = `Ethernet · ${status.ethernetStatus.ipv4 || status.ethernetStatus.interface}`;
|
||||
ethernetStatus.hidden = false;
|
||||
} else {
|
||||
ethernetStatus.hidden = true;
|
||||
}
|
||||
|
||||
// Update hotspot status badge
|
||||
const hotspotStatus = document.getElementById('hotspotStatus');
|
||||
const hotspotDot = hotspotStatus.querySelector('.status-dot');
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@
|
|||
<span class="status-dot offline"></span>
|
||||
<span class="status-text">Disconnected</span>
|
||||
</div>
|
||||
<div class="status-badge" id="ethernetStatus" hidden>
|
||||
<span class="status-dot active"></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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue