Commit 12e83a96 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[nextcloud] Rework server url UI

Use a FormLayout
Use InlineMessage to report errors
Hide controls when showing BusyIndicator
parent cd595b91
......@@ -13,37 +13,39 @@ import QtQuick.Controls 2.5
Kirigami.Page {
title: i18n("Nextcloud Login")
ColumnLayout {
spacing: 10
anchors.fill: parent
header: Kirigami.InlineMessage {
type: Kirigami.MessageType.Error
text: helper.errorMessage
visible: text.length > 0
}
Kirigami.FormLayout {
anchors.centerIn: parent
visible: !busy.running
TextField {
id: serverText
placeholderText: qsTr("Server address")
Layout.fillWidth: true
placeholderText: "https://nextcloud.provider.com"
Kirigami.FormData.label: i18n("Server address:")
}
Label {
id: errorLabel
Layout.fillWidth: true
visible: text.length > 0
text: helper.errorMessage
wrapMode: Text.WordWrap
}
BusyIndicator {
id: busy
width: Kirigami.Units.gridUnit * 2
height: width
Layout.alignment: Qt.AlignCenter
anchors.centerIn: parent
running: helper.isWorking
visible: running
}
footer: ToolBar {
RowLayout {
anchors.fill: parent
Button {
Layout.fillWidth: true
id: loginButton
icon.name: "go-next"
text: i18n("Next")
onClicked: helper.checkServer(serverText.text)
Layout.alignment: Qt.AlignRight
onClicked: {
helper.checkServer(serverText.text)
}
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment