mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
- Dedicated view in settings - VPN profile management - Ethernet disconnection - Turn prompts into floating windows
34 lines
852 B
QML
34 lines
852 B
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.Services
|
|
import qs.Widgets
|
|
import qs.Modules.Plugins
|
|
|
|
PluginComponent {
|
|
id: root
|
|
|
|
Ref {
|
|
service: DMSNetworkService
|
|
}
|
|
|
|
ccWidgetIcon: DMSNetworkService.isBusy ? "sync" : (DMSNetworkService.connected ? "vpn_lock" : "vpn_key_off")
|
|
ccWidgetPrimaryText: "VPN"
|
|
ccWidgetSecondaryText: {
|
|
if (!DMSNetworkService.connected)
|
|
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
|
|
|
|
onCcWidgetToggled: DMSNetworkService.toggleVpn()
|
|
|
|
ccDetailContent: Component {
|
|
VpnDetailContent {
|
|
listHeight: 180
|
|
}
|
|
}
|
|
}
|