ping boxen
This commit is contained in:
+33
-11
@@ -2,25 +2,47 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Window {
|
||||
width: 640
|
||||
height: 480
|
||||
width: 720
|
||||
height: 420
|
||||
visible: true
|
||||
title: qsTr("Mein Navidrome Client")
|
||||
title: "Navidrome Client"
|
||||
|
||||
Column {
|
||||
anchors.centerIn: parent
|
||||
spacing: 20
|
||||
spacing: 12
|
||||
width: parent.width * 0.75
|
||||
|
||||
Text {
|
||||
text: "Hallo Navidrome!"
|
||||
font.pixelSize: 24
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
TextField {
|
||||
id: hostField
|
||||
placeholderText: "Host, z.B. https://navidrome.example.de"
|
||||
text: "https://navidrome.timvandenboom.eth64.de"
|
||||
}
|
||||
TextField {
|
||||
id: userField
|
||||
placeholderText: "User"
|
||||
text: "nils"
|
||||
}
|
||||
TextField {
|
||||
id: passField
|
||||
placeholderText: "Passwort"
|
||||
echoMode: TextInput.Password
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Klick mich"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: console.log("Button gedrückt!")
|
||||
text: "Verbindung testen (ping)"
|
||||
onClicked: apiClient.ping(hostField.text, userField.text, passField.text)
|
||||
}
|
||||
|
||||
Label {
|
||||
text: apiClient.lastStatus
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: apiClient
|
||||
function onPingFinished(ok, message) {
|
||||
console.log("pingFinished:", ok, message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user