feat: add loading when scanning wifi
This commit is contained in:
parent
72fbc2f8d1
commit
a419e56690
1 changed files with 28 additions and 13 deletions
|
|
@ -30,7 +30,10 @@ Item {
|
||||||
running: false
|
running: false
|
||||||
command: ["nmcli", "-t", "-f", "SSID,SECURITY,SIGNAL,IN-USE", "device", "wifi", "list"]
|
command: ["nmcli", "-t", "-f", "SSID,SECURITY,SIGNAL,IN-USE", "device", "wifi", "list"]
|
||||||
onRunningChanged: {
|
onRunningChanged: {
|
||||||
// Removed debug log
|
console.log("scanProcess.running changed: " + running);
|
||||||
|
// if (!running) {
|
||||||
|
// console.log("scanProcess finished.");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
stdout: StdioCollector {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: {
|
onStreamFinished: {
|
||||||
|
|
@ -399,10 +402,22 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Item { Layout.fillWidth: true }
|
Item { Layout.fillWidth: true }
|
||||||
|
Spinner {
|
||||||
|
id: refreshIndicator
|
||||||
|
Layout.preferredWidth: 24
|
||||||
|
Layout.preferredHeight: 24
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
visible: scanProcess.running
|
||||||
|
running: scanProcess.running
|
||||||
|
color: Theme.accentPrimary // Assuming Spinner supports color property
|
||||||
|
size: 22 // Based on the existing Spinner usage
|
||||||
|
}
|
||||||
IconButton {
|
IconButton {
|
||||||
|
id: refreshButton
|
||||||
icon: "refresh"
|
icon: "refresh"
|
||||||
onClicked: wifiLogic.refreshNetworks()
|
onClicked: wifiLogic.refreshNetworks()
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
implicitWidth: 36; implicitHeight: 36; radius: 18
|
implicitWidth: 36; implicitHeight: 36; radius: 18
|
||||||
color: closeButtonArea.containsMouse ? Theme.accentPrimary : "transparent"
|
color: closeButtonArea.containsMouse ? Theme.accentPrimary : "transparent"
|
||||||
|
|
@ -557,18 +572,18 @@ Item {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredHeight: 22
|
Layout.preferredHeight: 22
|
||||||
Layout.preferredWidth: 22
|
Layout.preferredWidth: 22
|
||||||
Spinner {
|
Spinner {
|
||||||
visible: wifiLogic.connectingSsid === modelData.ssid
|
visible: wifiLogic.connectingSsid === modelData.ssid
|
||||||
running: wifiLogic.connectingSsid === modelData.ssid
|
running: wifiLogic.connectingSsid === modelData.ssid
|
||||||
color: Theme.accentPrimary
|
color: Theme.accentPrimary
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
size: 22
|
size: 22
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: networkMouseArea
|
id: networkMouseArea
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue