1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00
Files
DankMaterialShell/quickshell/Modules/ControlCenter/BuiltinPlugins/VpnWidget.qml
T
bbedward 3c0f2cbc48 i18n: term overhaul
- Delete ~160-ish useless terms
- Add context to more terms
- Add a mechanism to duplicate the same terms with different contexts
- sync
2026-07-16 12:15:20 -04:00

39 lines
1.0 KiB
QML

import QtQuick
import qs.Common
import qs.Services
import qs.Widgets
import qs.Modules.Plugins
PluginComponent {
id: root
Ref {
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 (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: vpnActivated
onCcWidgetToggled: DMSNetworkService.toggleVpn()
ccDetailContent: Component {
VpnDetailContent {
listHeight: 260
}
}
}