From 72366b3d5d23523854be07d460fd30e399bd518c Mon Sep 17 00:00:00 2001 From: Nils Walther Date: Sat, 3 Jan 2026 16:19:48 +0100 Subject: [PATCH] ping boxen --- resources/qml/Main.qml | 44 +++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/resources/qml/Main.qml b/resources/qml/Main.qml index 604a846..b74bfe9 100644 --- a/resources/qml/Main.qml +++ b/resources/qml/Main.qml @@ -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) } } }