diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-11 16:18:32 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-11 16:18:32 -0500 |
| commit | 5af1e9222e2f15c84102dc1ffb46e8643959e74a (patch) | |
| tree | 5f6d811062b320b94171fe591a96892a0fb71c7b /modules | |
| parent | controlcenter: truncating interface names if too long (diff) | |
| download | caelestia-shell-5af1e9222e2f15c84102dc1ffb46e8643959e74a.tar.gz caelestia-shell-5af1e9222e2f15c84102dc1ffb46e8643959e74a.tar.bz2 caelestia-shell-5af1e9222e2f15c84102dc1ffb46e8643959e74a.zip | |
controlcenter: added connection information to wireless to match ethernet panel
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/controlcenter/network/Details.qml | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/modules/controlcenter/network/Details.qml b/modules/controlcenter/network/Details.qml index 19e011f..31d20bc 100644 --- a/modules/controlcenter/network/Details.qml +++ b/modules/controlcenter/network/Details.qml @@ -16,6 +16,31 @@ Item { required property Session session readonly property var network: session.network.active + Component.onCompleted: { + if (network && network.active) { + Network.updateWirelessDeviceDetails(); + } + } + + onNetworkChanged: { + if (network && network.active) { + Network.updateWirelessDeviceDetails(); + } else { + Network.wirelessDeviceDetails = null; + } + } + + Connections { + target: Network + function onActiveChanged() { + if (root.network && root.network.active && Network.active && Network.active.ssid === root.network.ssid) { + Network.updateWirelessDeviceDetails(); + } else if (!root.network || !root.network.active) { + Network.wirelessDeviceDetails = null; + } + } + } + StyledFlickable { anchors.fill: parent @@ -198,6 +223,82 @@ Item { } } } + + StyledText { + Layout.topMargin: Appearance.spacing.large + text: qsTr("Connection information") + font.pointSize: Appearance.font.size.larger + font.weight: 500 + } + + StyledText { + text: qsTr("Network connection details") + color: Colours.palette.m3outline + } + + StyledRect { + Layout.fillWidth: true + implicitHeight: connectionInfo.implicitHeight + Appearance.padding.large * 2 + + radius: Appearance.rounding.normal + color: Colours.tPalette.m3surfaceContainer + + ColumnLayout { + id: connectionInfo + + anchors.left: parent.left + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + anchors.margins: Appearance.padding.large + + spacing: Appearance.spacing.small / 2 + + StyledText { + text: qsTr("IP Address") + } + + StyledText { + text: Network.wirelessDeviceDetails?.ipAddress || qsTr("Not available") + color: Colours.palette.m3outline + font.pointSize: Appearance.font.size.small + } + + StyledText { + Layout.topMargin: Appearance.spacing.normal + text: qsTr("Subnet Mask") + } + + StyledText { + text: Network.wirelessDeviceDetails?.subnet || qsTr("Not available") + color: Colours.palette.m3outline + font.pointSize: Appearance.font.size.small + } + + StyledText { + Layout.topMargin: Appearance.spacing.normal + text: qsTr("Gateway") + } + + StyledText { + text: Network.wirelessDeviceDetails?.gateway || qsTr("Not available") + color: Colours.palette.m3outline + font.pointSize: Appearance.font.size.small + } + + StyledText { + Layout.topMargin: Appearance.spacing.normal + text: qsTr("DNS Servers") + } + + StyledText { + text: (Network.wirelessDeviceDetails && Network.wirelessDeviceDetails.dns && Network.wirelessDeviceDetails.dns.length > 0) ? Network.wirelessDeviceDetails.dns.join(", ") : qsTr("Not available") + color: Colours.palette.m3outline + font.pointSize: Appearance.font.size.small + wrapMode: Text.Wrap + Layout.maximumWidth: parent.width + } + } + } } } |