mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
WiFi: Hide pill text when no WiFi or ethernet is connected.
This commit is contained in:
@@ -60,21 +60,22 @@ Item {
|
||||
text: {
|
||||
try {
|
||||
if (NetworkService.ethernetConnected) {
|
||||
return "ethernet"
|
||||
return ""
|
||||
}
|
||||
for (const net in NetworkService.networks) {
|
||||
if (NetworkService.networks[net].connected) {
|
||||
return net
|
||||
}
|
||||
}
|
||||
return ""
|
||||
} catch (error) {
|
||||
Logger.e("Wi-Fi", "Error getting ssid:", error)
|
||||
return "error"
|
||||
}
|
||||
return "unknown"
|
||||
}
|
||||
autoHide: false
|
||||
forceOpen: root.displayMode === "alwaysShow"
|
||||
forceClose: root.displayMode === "alwaysHide"
|
||||
forceClose: root.displayMode === "alwaysHide" || !pill.text
|
||||
disableOpen: NetworkService.ethernetConnected
|
||||
onClicked: PanelService.getPanel("wifiPanel")?.toggle(this)
|
||||
onRightClicked: PanelService.getPanel("wifiPanel")?.toggle(this)
|
||||
|
||||
Reference in New Issue
Block a user