diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-14 11:59:36 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-14 11:59:36 -0500 |
| commit | 540cebdbbdafe51e0f946e7a256320537a332612 (patch) | |
| tree | a0626e385ceee06f03df7d1506043ce24d944c53 /modules/controlcenter/network/NetworkingSettings.qml | |
| parent | nmcli: refactor to be readable/extensible (diff) | |
| download | caelestia-shell-540cebdbbdafe51e0f946e7a256320537a332612.tar.gz caelestia-shell-540cebdbbdafe51e0f946e7a256320537a332612.tar.bz2 caelestia-shell-540cebdbbdafe51e0f946e7a256320537a332612.zip | |
controlcenter: merging wireless/ethernet panes (wip/stash)
Diffstat (limited to 'modules/controlcenter/network/NetworkingSettings.qml')
| -rw-r--r-- | modules/controlcenter/network/NetworkingSettings.qml | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/modules/controlcenter/network/NetworkingSettings.qml b/modules/controlcenter/network/NetworkingSettings.qml new file mode 100644 index 0000000..2475fed --- /dev/null +++ b/modules/controlcenter/network/NetworkingSettings.qml @@ -0,0 +1,106 @@ +pragma ComponentBehavior: Bound + +import ".." +import qs.components +import qs.components.controls +import qs.components.effects +import qs.services +import qs.config +import QtQuick +import QtQuick.Layouts + +ColumnLayout { + id: root + + required property Session session + + spacing: Appearance.spacing.normal + + MaterialIcon { + Layout.alignment: Qt.AlignHCenter + text: "router" + font.pointSize: Appearance.font.size.extraLarge * 3 + font.bold: true + } + + StyledText { + Layout.alignment: Qt.AlignHCenter + text: qsTr("Networking settings") + font.pointSize: Appearance.font.size.large + font.bold: true + } + + SectionHeader { + Layout.topMargin: Appearance.spacing.large + title: qsTr("Ethernet") + description: qsTr("Ethernet device information") + } + + SectionContainer { + contentSpacing: Appearance.spacing.small / 2 + + PropertyRow { + label: qsTr("Total devices") + value: qsTr("%1").arg(Nmcli.ethernetDevices.length) + } + + PropertyRow { + showTopMargin: true + label: qsTr("Connected devices") + value: qsTr("%1").arg(Nmcli.ethernetDevices.filter(d => d.connected).length) + } + } + + SectionHeader { + Layout.topMargin: Appearance.spacing.large + title: qsTr("Wireless") + description: qsTr("WiFi network settings") + } + + SectionContainer { + ToggleRow { + label: qsTr("WiFi enabled") + checked: Nmcli.wifiEnabled + toggle.onToggled: { + Nmcli.enableWifi(checked); + } + } + } + + SectionHeader { + Layout.topMargin: Appearance.spacing.large + title: qsTr("Current connection") + description: qsTr("Active network connection information") + } + + SectionContainer { + contentSpacing: Appearance.spacing.small / 2 + + PropertyRow { + label: qsTr("Network") + value: Nmcli.active ? Nmcli.active.ssid : (Nmcli.activeEthernet ? Nmcli.activeEthernet.interface : qsTr("Not connected")) + } + + PropertyRow { + showTopMargin: true + visible: Nmcli.active !== null + label: qsTr("Signal strength") + value: Nmcli.active ? qsTr("%1%").arg(Nmcli.active.strength) : qsTr("N/A") + } + + PropertyRow { + showTopMargin: true + visible: Nmcli.active !== null + label: qsTr("Security") + value: Nmcli.active ? (Nmcli.active.isSecure ? qsTr("Secured") : qsTr("Open")) : qsTr("N/A") + } + + PropertyRow { + showTopMargin: true + visible: Nmcli.active !== null + label: qsTr("Frequency") + value: Nmcli.active ? qsTr("%1 MHz").arg(Nmcli.active.frequency) : qsTr("N/A") + } + } +} + |