summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-25 12:00:22 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-25 12:00:22 +0800
commit533c052b002de629526b63a0154d9e9e99185610 (patch)
tree8a1509c25822ab265b2e2147d89fba67db6c8794
parentd8aea999ab6b575bac5e436bdc309d9045558a28 (diff)
Editing profile reveals the text fields
and hides the labels
-rw-r--r--Profile.qml30
m---------larva0
-rw-r--r--larva.qrc1
3 files changed, 29 insertions, 2 deletions
diff --git a/Profile.qml b/Profile.qml
index d465c78..3a50d49 100644
--- a/Profile.qml
+++ b/Profile.qml
@@ -4,7 +4,35 @@ import "larva/features"
ProfileForm {
backButton.onClicked: pageView.pop()
- editToolButton.onClicked: pageView.push("/larva/features/ProfileEditForm.ui.qml")
+ editToolButton.onClicked: {
+ userEmailTextField.text = User.emailAddress
+ usernameTextField.text = User.name
+ fullnameTextField.text = User.realName
+ editToolButton.visible = false
+ fullnameLabel.visible = false
+ usernameLabel.visible = false
+ userEmailLabel.visible = false
+ saveProfileButton.visible = true
+ fullnameTextField.visible = true
+ usernameTextField.visible = true
+ userEmailTextField.visible = true
+ }
+ saveProfileButton.onClicked: {
+ User.emailAddress = userEmailTextField.text
+ User.name = usernameTextField.text
+ User.realName = fullnameTextField.text
+ fullnameLabel.text = User.realName
+ usernameLabel.text = User.name
+ userEmailLabel.text = User.emailAddress
+ saveProfileButton.visible = false
+ fullnameTextField.visible = false
+ usernameTextField.visible = false
+ userEmailTextField.visible = false
+ editToolButton.visible = true
+ fullnameLabel.visible = true
+ usernameLabel.visible = true
+ userEmailLabel.visible = true
+ }
fullnameLabel.text: User.realName
usernameLabel.text: User.name
userEmailLabel.text: User.emailAddress
diff --git a/larva b/larva
-Subproject 9cfffd5b6ea437fef61512728472999158a084b
+Subproject af814b7312868cbfb54ebc994a7996c81d0f967
diff --git a/larva.qrc b/larva.qrc
index 7fc08fc..8814cbb 100644
--- a/larva.qrc
+++ b/larva.qrc
@@ -10,7 +10,6 @@
<file>larva/features/TaskForm.ui.qml</file>
<file>larva/features/EnterPasswordForm.ui.qml</file>
<file>larva/features/ProfileForm.ui.qml</file>
- <file>larva/features/ProfileEditForm.ui.qml</file>
<file>larva/features/TaskDetailForm.ui.qml</file>
<file>larva/features/EmailForm.ui.qml</file>
<file>larva/features/PasswordForm.ui.qml</file>