Server.qml 1.2 KB
Newer Older
1
/*
2 3
 *  SPDX-FileCopyrightText: 2019 Rituka Patwal <ritukapatwal21@gmail.com>
 *  SPDX-FileCopyrightText: 2015 Martin Klapetek <mklapetek@kde.org>
4
 *
5
 *  SPDX-License-Identifier: LGPL-2.0-or-later
6 7 8 9 10 11 12
 */

import QtQuick 2.2
import org.kde.kirigami 2.5 as Kirigami
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.5

13 14
Kirigami.Page {
    title: i18n("Nextcloud Login")
15

16 17 18 19 20
    header: Kirigami.InlineMessage {
        type: Kirigami.MessageType.Error
        text: helper.errorMessage
        visible: text.length > 0
    }
21

22 23 24
    Kirigami.FormLayout {
        anchors.centerIn: parent
        visible: !busy.running
25 26
        TextField {
            id: serverText
27 28
            placeholderText: "https://nextcloud.provider.com"
            Kirigami.FormData.label: i18n("Server address:")
29
        }
30
    }
31

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
    BusyIndicator {
        id: busy
        anchors.centerIn: parent
        running: helper.isWorking
    }

    footer: ToolBar {
         RowLayout {
            anchors.fill: parent

            Button {
                text: i18n("Next")
                Layout.alignment: Qt.AlignRight
                onClicked: {
                    helper.checkServer(serverText.text)
                }
            }
         }
50 51
    }
}