From 79998ab544e841ecddc42f76ad781f34585fb9ab Mon Sep 17 00:00:00 2001 From: Yari Polla Date: Wed, 1 Mar 2023 18:30:33 +0100 Subject: [PATCH] quicksettings/hotspot: add SSID in status --- quicksettings/hotspot/contents/ui/main.qml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/quicksettings/hotspot/contents/ui/main.qml b/quicksettings/hotspot/contents/ui/main.qml index d5e4c648..9196909a 100644 --- a/quicksettings/hotspot/contents/ui/main.qml +++ b/quicksettings/hotspot/contents/ui/main.qml @@ -13,10 +13,16 @@ MobileShell.QuickSetting { id: nmHandler } + PlasmaNM.WirelessStatus { + id: wirelessStatus + } + + text: i18n("Hotspot") icon: "network-wireless-hotspot" - enabled: false + enabled: wirelessStatus.hotspotSSID.length !== 0 + status: enabled ? wirelessStatus.hotspotSSID : "" function toggle() { if (!enabled) { @@ -25,17 +31,4 @@ MobileShell.QuickSetting { nmHandler.stopHotspot(); } } - - Connections { - target: nmHandler - - function onHotspotCreated() { - root.enabled = true; - } - - function onHotspotDisabled() { - root.enabled = false; - } - } - }