This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-app/nymea-app/ui/connection/CloudLoginPage.qml
2018-08-31 14:44:09 +02:00

44 lines
1.0 KiB
QML

import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import Nymea 1.0
import "../components"
Page {
id: root
header: GuhHeader {
text: qsTr("Cloud login")
onBackPressed: pageStack.pop()
}
ColumnLayout {
anchors.fill: parent
Label {
Layout.fillWidth: true
text: "Username (e-mail)"
}
TextField {
id: usernameTextField
Layout.fillWidth: true
placeholderText: "john@dummy.com"
}
Label {
Layout.fillWidth: true
text: qsTr("Password")
}
TextField {
id: passwordTextField
Layout.fillWidth: true
}
Button {
Layout.fillWidth: true
text: qsTr("OK")
enabled: usernameTextField.displayText.length > 0 && passwordTextField.displayText.length > 0
onClicked: {
Engine.awsClient.login(usernameTextField.text, passwordTextField.text);
}
}
}
}