quicksettings/hotspot: add SSID in status

This commit is contained in:
Yari Polla 2023-03-01 18:30:33 +01:00
parent c0e2c4eb22
commit 79998ab544

View file

@ -13,10 +13,16 @@ MobileShell.QuickSetting {
id: nmHandler id: nmHandler
} }
PlasmaNM.WirelessStatus {
id: wirelessStatus
}
text: i18n("Hotspot") text: i18n("Hotspot")
icon: "network-wireless-hotspot" icon: "network-wireless-hotspot"
enabled: false enabled: wirelessStatus.hotspotSSID.length !== 0
status: enabled ? wirelessStatus.hotspotSSID : ""
function toggle() { function toggle() {
if (!enabled) { if (!enabled) {
@ -25,17 +31,4 @@ MobileShell.QuickSetting {
nmHandler.stopHotspot(); nmHandler.stopHotspot();
} }
} }
Connections {
target: nmHandler
function onHotspotCreated() {
root.enabled = true;
}
function onHotspotDisabled() {
root.enabled = false;
}
}
} }