diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/ConfirmPassword.qml | 7 | ||||
-rw-r--r-- | pages/CreateProfile.qml | 31 | ||||
-rw-r--r-- | pages/CreateProfileForm.ui.qml | 1 | ||||
-rw-r--r-- | pages/Email.qml | 2 |
4 files changed, 35 insertions, 6 deletions
diff --git a/pages/ConfirmPassword.qml b/pages/ConfirmPassword.qml index 37e2ce0..6d37be7 100644 --- a/pages/ConfirmPassword.qml +++ b/pages/ConfirmPassword.qml @@ -12,12 +12,13 @@ PasswordForm { passTextField { placeholderText: qsTr("Re-enter Password") onTextChanged: - if (!passTextField.text || !createPassButton.enabled) - createPassButton.enabled = !createPassButton.enabled + if (passTextField.text == User.password) + createPassButton.enabled = true } createPassButton { + enabled: false text: qsTr("Confirm password") - onClicked: login.logIn(User.name, User.password) + onClicked: stackView.push("qrc:/pages/CreateProfile.qml") } } diff --git a/pages/CreateProfile.qml b/pages/CreateProfile.qml index 483814f..b0b03a1 100644 --- a/pages/CreateProfile.qml +++ b/pages/CreateProfile.qml @@ -6,9 +6,36 @@ CreateProfileForm { height: stackView.height backButton.onClicked: stackView.pop() skipButton.onClicked: { - login.search(User.name) stackView.push("qrc:/pages/Home.qml") } emailAddressLabel.text: User.emailAddress - enterFullName.text: User.realName + startUsingKelakon.onClicked: { + User.name = userNameLabel.text + User.realName = enterFullName.text + login.signUp( + User.name + , User.emailAddress + , User.realName + , "" + , "" + , 0 + , 0 + , "" + , true + , false + , User.password + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "") + } } diff --git a/pages/CreateProfileForm.ui.qml b/pages/CreateProfileForm.ui.qml index 2b1ce91..ab1f828 100644 --- a/pages/CreateProfileForm.ui.qml +++ b/pages/CreateProfileForm.ui.qml @@ -12,6 +12,7 @@ Rectangle { property alias enterFullName: enterFullName property alias userNameLabel: userNameLabel property alias emailAddressLabel: emailAddressLabel + property alias startUsingKelakon: startUsingKelakon ToolBar { id: toolbar diff --git a/pages/Email.qml b/pages/Email.qml index a78f655..0919437 100644 --- a/pages/Email.qml +++ b/pages/Email.qml @@ -12,7 +12,7 @@ EmailForm { } loginButton.onClicked: { - User.name = emailTextField.text + User.emailAddress = emailTextField.text stackView.push("qrc:/pages/Password.qml") } } |