working connecting and entering password

This commit is contained in:
talksik
2024-02-09 12:50:06 -08:00
parent edefbf5b13
commit 13bf908ab9
6 changed files with 46 additions and 1 deletions
+13 -1
View File
@@ -10,6 +10,7 @@ Window {
title: "WIFI Picker"
signal scanNetworks()
signal connectToNetwork(networkName: string, password: string)
ColumnLayout {
id: layout
@@ -27,9 +28,17 @@ Window {
Text {
text: "Loading"
width: 100
visible: layout.isLoading
}
TextInput {
id: passwordInput
text: "enter password"
selectionColor: "blue"
width: 500
}
ListView {
id: listview
visible: !layout.isLoading
@@ -75,7 +84,10 @@ Window {
Button {
visible: !listItem.isConnected && listItem.hovered
text: "Connect"
onClicked: console.log("connecting to " + listItem.name)
onClicked: {
console.log("connecting to " + listItem.name)
window.connectToNetwork(listItem.name, passwordInput.text)
}
}
}
}