summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/CreateProfileForm.ui.qml4
-rw-r--r--pages/EmailForm.ui.qml2
-rw-r--r--pages/LoginName.qml19
-rw-r--r--pages/LoginPass.qml20
-rw-r--r--pages/Profile.qml15
5 files changed, 59 insertions, 1 deletions
diff --git a/pages/CreateProfileForm.ui.qml b/pages/CreateProfileForm.ui.qml
index 45087e1..d63e9ee 100644
--- a/pages/CreateProfileForm.ui.qml
+++ b/pages/CreateProfileForm.ui.qml
@@ -9,8 +9,9 @@ Rectangle {
property alias backButton: backButton
property alias skipButton: skipButton
- property alias emailAddressLabel: emailAddressLabel
property alias enterFullName: enterFullName
+ property alias userNameLabel: userNameLabel
+ property alias emailAddressLabel: emailAddressLabel
ToolBar {
id: toolbar
@@ -139,6 +140,7 @@ Rectangle {
}
TextField {
+ id: userNameLabel
Layout.rightMargin: 16
Layout.leftMargin: 24
font.pointSize: 16
diff --git a/pages/EmailForm.ui.qml b/pages/EmailForm.ui.qml
index c2325fc..dc679ab 100644
--- a/pages/EmailForm.ui.qml
+++ b/pages/EmailForm.ui.qml
@@ -9,6 +9,7 @@ Rectangle {
border.width: 0
property alias backButton: backButton
+ property alias instructionLabel: instructionLabel
property alias emailTextField: emailTextField
property alias loginButton: loginButton
@@ -40,6 +41,7 @@ Rectangle {
}
Label {
+ id: instructionLabel
x: 16
y: 398
color: "#2b2626"
diff --git a/pages/LoginName.qml b/pages/LoginName.qml
new file mode 100644
index 0000000..72b069b
--- /dev/null
+++ b/pages/LoginName.qml
@@ -0,0 +1,19 @@
+import QtQuick 2.12
+import KelakonUser 0.1
+
+EmailForm {
+ width: stackView.width
+ height: stackView.height
+ backButton.onClicked: stackView.pop()
+ instructionLabel.text: qsTr("Enter e-mail")
+
+ emailTextField.onTextChanged: {
+ if (!emailTextField.text || !loginButton.enabled)
+ loginButton.enabled = !loginButton.enabled
+ }
+
+ loginButton.onClicked: {
+ User.name = emailTextField.text
+ stackView.push("qrc:/pages/LoginPass.qml")
+ }
+}
diff --git a/pages/LoginPass.qml b/pages/LoginPass.qml
new file mode 100644
index 0000000..9e5d2f4
--- /dev/null
+++ b/pages/LoginPass.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.12
+import KelakonUser 0.1
+
+PasswordForm {
+ width: stackView.width
+ height: stackView.height
+ backButton.onClicked: stackView.pop()
+ instructionLabel.text: qsTr("Enter password")
+ emailAddressLabel.text: User.name
+
+ passTextField.onTextChanged: {
+ if (!passTextField.text || !createPassButton.enabled)
+ createPassButton.enabled = !createPassButton.enabled
+ }
+
+ createPassButton.onClicked: {
+ User.password = passTextField.text
+ onClicked: login.logIn(User.name, User.password)
+ }
+}
diff --git a/pages/Profile.qml b/pages/Profile.qml
new file mode 100644
index 0000000..89dd09e
--- /dev/null
+++ b/pages/Profile.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.12
+import KelakonUser 0.1
+
+CreateProfileForm {
+ width: stackView.width
+ height: stackView.height
+ backButton.onClicked: stackView.pop()
+ skipButton.onClicked: {
+ login.search(User.name)
+ stackView.push("qrc:/pages/Home.qml")
+ }
+ enterFullName.text: User.realName
+ userNameLabel.text: User.name
+ emailAddressLabel.text: User.emailAddress
+}