49 lines
1.1 KiB
QML
49 lines
1.1 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
|
|
Window {
|
|
width: 720
|
|
height: 420
|
|
visible: true
|
|
title: "Navidrome Client"
|
|
|
|
Column {
|
|
anchors.centerIn: parent
|
|
spacing: 12
|
|
width: parent.width * 0.75
|
|
|
|
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: "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)
|
|
}
|
|
}
|
|
}
|