diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-13 19:56:44 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-13 19:56:44 -0500 |
| commit | 2bb9cd068fe64ab82215a8bc24d82b2a631b2e95 (patch) | |
| tree | c0a61f513e18d70053a587b64c6b850c95c4fdc1 /modules/controlcenter/ethernet | |
| parent | nmcli: migrated all of wireless controlcenter (diff) | |
| download | caelestia-shell-2bb9cd068fe64ab82215a8bc24d82b2a631b2e95.tar.gz caelestia-shell-2bb9cd068fe64ab82215a8bc24d82b2a631b2e95.tar.bz2 caelestia-shell-2bb9cd068fe64ab82215a8bc24d82b2a631b2e95.zip | |
nmcli: migrated all of ethernet controlcenter
Diffstat (limited to 'modules/controlcenter/ethernet')
| -rw-r--r-- | modules/controlcenter/ethernet/EthernetDetails.qml | 13 | ||||
| -rw-r--r-- | modules/controlcenter/ethernet/EthernetList.qml | 9 | ||||
| -rw-r--r-- | modules/controlcenter/ethernet/EthernetSettings.qml | 4 |
3 files changed, 12 insertions, 14 deletions
diff --git a/modules/controlcenter/ethernet/EthernetDetails.qml b/modules/controlcenter/ethernet/EthernetDetails.qml index d9a004b..68510da 100644 --- a/modules/controlcenter/ethernet/EthernetDetails.qml +++ b/modules/controlcenter/ethernet/EthernetDetails.qml @@ -18,15 +18,15 @@ Item { Component.onCompleted: { if (device && device.interface) { - Network.updateEthernetDeviceDetails(device.interface); + Nmcli.getEthernetDeviceDetails(device.interface, () => {}); } } onDeviceChanged: { if (device && device.interface) { - Network.updateEthernetDeviceDetails(device.interface); + Nmcli.getEthernetDeviceDetails(device.interface, () => {}); } else { - Network.ethernetDeviceDetails = null; + Nmcli.ethernetDeviceDetails = null; } } @@ -59,11 +59,10 @@ Item { checked: root.device?.connected ?? false toggle.onToggled: { if (checked) { - // Use connection name if available, otherwise use interface - Network.connectEthernet(root.device?.connection || "", root.device?.interface || ""); + Nmcli.connectEthernet(root.device?.connection || "", root.device?.interface || "", () => {}); } else { if (root.device?.connection) { - Network.disconnectEthernet(root.device.connection); + Nmcli.disconnectEthernet(root.device.connection, () => {}); } } } @@ -103,7 +102,7 @@ Item { SectionContainer { ConnectionInfoSection { - deviceDetails: Network.ethernetDeviceDetails + deviceDetails: Nmcli.ethernetDeviceDetails } } diff --git a/modules/controlcenter/ethernet/EthernetList.qml b/modules/controlcenter/ethernet/EthernetList.qml index b8c485b..45c9481 100644 --- a/modules/controlcenter/ethernet/EthernetList.qml +++ b/modules/controlcenter/ethernet/EthernetList.qml @@ -49,7 +49,7 @@ ColumnLayout { spacing: Appearance.spacing.small StyledText { - text: qsTr("Devices (%1)").arg(Network.ethernetDeviceCount || Network.ethernetDevices.length) + text: qsTr("Devices (%1)").arg(Nmcli.ethernetDevices.length) font.pointSize: Appearance.font.size.large font.weight: 500 } @@ -66,7 +66,7 @@ ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true - model: Network.ethernetDevices + model: Nmcli.ethernetDevices spacing: Appearance.spacing.small / 2 clip: true @@ -145,10 +145,9 @@ ColumnLayout { StateLayer { function onClicked(): void { if (modelData.connected && modelData.connection) { - Network.disconnectEthernet(modelData.connection); + Nmcli.disconnectEthernet(modelData.connection, () => {}); } else { - // Use connection name if available, otherwise use interface - Network.connectEthernet(modelData.connection || "", modelData.interface || ""); + Nmcli.connectEthernet(modelData.connection || "", modelData.interface || "", () => {}); } } } diff --git a/modules/controlcenter/ethernet/EthernetSettings.qml b/modules/controlcenter/ethernet/EthernetSettings.qml index 68a1f61..161492c 100644 --- a/modules/controlcenter/ethernet/EthernetSettings.qml +++ b/modules/controlcenter/ethernet/EthernetSettings.qml @@ -64,7 +64,7 @@ ColumnLayout { } StyledText { - text: qsTr("%1").arg(Network.ethernetDeviceCount || Network.ethernetDevices.length) + text: qsTr("%1").arg(Nmcli.ethernetDevices.length) color: Colours.palette.m3outline font.pointSize: Appearance.font.size.small } @@ -75,7 +75,7 @@ ColumnLayout { } StyledText { - text: qsTr("%1").arg(Network.ethernetDevices.filter(d => d.connected).length) + text: qsTr("%1").arg(Nmcli.ethernetDevices.filter(d => d.connected).length) color: Colours.palette.m3outline font.pointSize: Appearance.font.size.small } |