summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorErik Prabowo Kamal <erik@darapsa.co.id>2019-08-31 13:07:00 +0800
committerErik Prabowo Kamal <erik@darapsa.co.id>2019-08-31 13:07:00 +0800
commit6272e8647f19cf9d12ed1f3caef9e1c31e4150d6 (patch)
treeb4e155dabe8c22ab96dfd310a76340d2075b0e66 /pages
parentca698a94c93278d80bef3a93196f8289546b47da (diff)
Set up flows from password form to profile creation form
Diffstat (limited to 'pages')
-rw-r--r--pages/ConfirmPassword.qml27
-rw-r--r--pages/ConfirmPasswordForm.ui.qml12
-rw-r--r--pages/CreateProfile.qml16
-rw-r--r--pages/CreateProfileForm.ui.qml3
-rw-r--r--pages/Password.qml29
5 files changed, 42 insertions, 45 deletions
diff --git a/pages/ConfirmPassword.qml b/pages/ConfirmPassword.qml
index a93afda..78e57f1 100644
--- a/pages/ConfirmPassword.qml
+++ b/pages/ConfirmPassword.qml
@@ -3,16 +3,21 @@ import id.co.darapsa.kelakon.user 0.1
import id.co.darapsa.kelakon.rtclient 0.1
ConfirmPasswordForm {
- width: stackView.width
- height: stackView.height
- backButton {
- onClicked: {
- stackView.pop()
- }
- }
-}
+ width: stackView.width
+ height: stackView.height
+
+ backButton {
+ onClicked: {
+ stackView.pop()
+ }
+ }
+
+ emailAddressLabel.text: User.emailAddress
-/*##^## Designer {
- D{i:0;autoSize:true;height:480;width:640}
+ confirmPassButton {
+ onClicked: {
+ RTClient.logIn(User.emailAddress, User.password)
+ stackView.push("qrc:/pages/CreateProfile.qml")
+ }
+ }
}
- ##^##*/
diff --git a/pages/ConfirmPasswordForm.ui.qml b/pages/ConfirmPasswordForm.ui.qml
index bf0ff82..f29fec2 100644
--- a/pages/ConfirmPasswordForm.ui.qml
+++ b/pages/ConfirmPasswordForm.ui.qml
@@ -1,5 +1,5 @@
import QtQuick 2.12
-import QtQuick.Layouts 1.3
+import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
@@ -10,7 +10,7 @@ Rectangle {
property alias backButton: backButton
property alias passTextField: confirmPassTextField
- property alias createPassButton: confirmPassButton
+ property alias confirmPassButton: confirmPassButton
property alias emailAddressLabel: emailAddressLabel
Rectangle {
@@ -115,11 +115,3 @@ Rectangle {
Material.background: Material.primary
}
}
-
-
-
-
-/*##^## Designer {
- D{i:0;autoSize:true;height:480;width:640}
-}
- ##^##*/
diff --git a/pages/CreateProfile.qml b/pages/CreateProfile.qml
index 77c1742..9cfb615 100644
--- a/pages/CreateProfile.qml
+++ b/pages/CreateProfile.qml
@@ -1,14 +1,12 @@
import QtQuick 2.12
-import id.co.darapsa.kelakon.user 0.1
-import id.co.darapsa.kelakon.rtclient 0.1
CreateProfileForm {
- width: stackView.width
- height: stackView.height
- }
-}
+ width: stackView.width
+ height: stackView.height
-/*##^## Designer {
- D{i:0;autoSize:true;height:480;width:640}
+ backButton {
+ onClicked: {
+ stackView.pop()
+ }
+ }
}
- ##^##*/
diff --git a/pages/CreateProfileForm.ui.qml b/pages/CreateProfileForm.ui.qml
index 3a34d36..e1245c3 100644
--- a/pages/CreateProfileForm.ui.qml
+++ b/pages/CreateProfileForm.ui.qml
@@ -7,6 +7,8 @@ Rectangle {
id: rectangle
color: "#fff"
+ property alias backButton: backButton
+
ToolBar {
height: 48
anchors.top: parent.top
@@ -25,6 +27,7 @@ Rectangle {
anchors.fill: parent
ToolButton {
+ id: backButton
icon.name: "back-icon"
icon.source: "/assets/arrow-back-24px.svg"
icon.color: "transparent"
diff --git a/pages/Password.qml b/pages/Password.qml
index befeea5..4a1ae59 100644
--- a/pages/Password.qml
+++ b/pages/Password.qml
@@ -1,22 +1,21 @@
import QtQuick 2.12
import id.co.darapsa.kelakon.user 0.1
-import id.co.darapsa.kelakon.rtclient 0.1
PasswordForm {
- width: stackView.width
- height: stackView.height
- backButton {
- onClicked: {
- stackView.pop()
- }
- }
+ width: stackView.width
+ height: stackView.height
+ backButton {
+ onClicked: {
+ stackView.pop()
+ }
+ }
- createPassButton {
- onClicked: {
- User.password = passTextField.text
- RTClient.logIn(User.emailAddress, User.password)
- }
- }
+ emailAddressLabel.text: User.emailAddress
- emailAddressLabel.text: User.emailAddress
+ createPassButton {
+ onClicked: {
+ User.password = passTextField.text
+ stackView.push("qrc:/pages/ConfirmPassword.qml")
+ }
+ }
}