diff options
Diffstat (limited to 'Profile.qml')
-rw-r--r-- | Profile.qml | 30 |
1 files changed, 29 insertions, 1 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 |