From 533c052b002de629526b63a0154d9e9e99185610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Wed, 25 Sep 2019 12:00:22 +0800 Subject: Editing profile reveals the text fields and hides the labels --- Profile.qml | 30 +++++++++++++++++++++++++++++- larva | 2 +- larva.qrc | 1 - 3 files changed, 30 insertions(+), 3 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 index 9cfffd5..af814b7 160000 --- a/larva +++ b/larva @@ -1 +1 @@ -Subproject commit 9cfffd5b6ea437fef61512728472999158a084b7 +Subproject commit af814b7312868cbfb54ebc994a7996c81d0f9670 diff --git a/larva.qrc b/larva.qrc index 7fc08fc..8814cbb 100644 --- a/larva.qrc +++ b/larva.qrc @@ -10,7 +10,6 @@ larva/features/TaskForm.ui.qml larva/features/EnterPasswordForm.ui.qml larva/features/ProfileForm.ui.qml - larva/features/ProfileEditForm.ui.qml larva/features/TaskDetailForm.ui.qml larva/features/EmailForm.ui.qml larva/features/PasswordForm.ui.qml -- cgit v1.2.3