1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-24 03:55:23 -04:00

fix(network): fix excessive network prompting on failures, add VPN

connection statuses
This commit is contained in:
bbedward
2026-06-23 13:58:58 -04:00
parent 0e7901ebbe
commit 28f40afccf
15 changed files with 471 additions and 31 deletions
@@ -11,17 +11,22 @@ PluginComponent {
service: DMSNetworkService
}
readonly property bool vpnActivating: DMSNetworkService.vpnIsBusy || DMSNetworkService.activeState === "activating"
readonly property bool vpnActivated: DMSNetworkService.connected && DMSNetworkService.activeState === "activated"
ccWidgetIcon: "vpn_key"
ccWidgetPrimaryText: I18n.tr("VPN")
ccWidgetSecondaryText: {
if (!DMSNetworkService.connected)
if (vpnActivating)
return I18n.tr("Connecting…");
if (!vpnActivated)
return I18n.tr("Disconnected");
const names = DMSNetworkService.activeNames || [];
if (names.length <= 1)
return names[0] || I18n.tr("Connected");
return names[0] + " +" + (names.length - 1);
}
ccWidgetIsActive: DMSNetworkService.connected
ccWidgetIsActive: vpnActivated
onCcWidgetToggled: DMSNetworkService.toggleVpn()