mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
feat: Blink WiFi/Bluetooth icons while connecting (#2448)
Pulses the WiFi and Bluetooth status icons while a connection is in progress (lock screen, DankBar control center button, control center compound pill). The pulse is implemented as a reusable Widgets/DankBlink component, and the wifi-connecting condition is centralized as NetworkService.isWifiConnecting. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,20 @@ Singleton {
|
||||
});
|
||||
return isConnected;
|
||||
}
|
||||
readonly property bool connecting: {
|
||||
if (!adapter || !adapter.devices) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let busy = false;
|
||||
adapter.devices.values.forEach(dev => {
|
||||
if (!dev)
|
||||
return;
|
||||
if (dev.pairing || dev.state === BluetoothDeviceState.Connecting)
|
||||
busy = true;
|
||||
});
|
||||
return busy;
|
||||
}
|
||||
readonly property var pairedDevices: {
|
||||
if (!adapter || !adapter.devices) {
|
||||
return [];
|
||||
|
||||
@@ -41,6 +41,9 @@ Singleton {
|
||||
property var savedConnections: []
|
||||
property var ssidToConnectionName: ({})
|
||||
property var wifiSignalIcon: {
|
||||
if (isConnecting) {
|
||||
return "wifi";
|
||||
}
|
||||
if (!wifiConnected) {
|
||||
return "wifi_off";
|
||||
}
|
||||
|
||||
@@ -99,6 +99,9 @@ Singleton {
|
||||
}
|
||||
|
||||
readonly property string wifiSignalIcon: {
|
||||
if (isConnecting) {
|
||||
return "wifi";
|
||||
}
|
||||
if (!wifiConnected || networkStatus !== "wifi") {
|
||||
return "wifi_off";
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ Singleton {
|
||||
|
||||
property string userPreference: activeService?.userPreference ?? "auto"
|
||||
property bool isConnecting: activeService?.isConnecting ?? false
|
||||
readonly property bool isWifiConnecting: isConnecting && !ethernetConnected && !wifiToggling
|
||||
property string connectingSSID: activeService?.connectingSSID ?? ""
|
||||
property string connectionError: activeService?.connectionError ?? ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user