aboutsummaryrefslogtreecommitdiff
path: root/wizard/WizardPassword.qml
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-01-26 00:17:55 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-01-26 00:17:55 +0300
commit78b556575a8b6bcd2fb595dc56260b2c4203f637 (patch)
treed9c7ba9ec13873c37eced9d1b21410f0f918af2e /wizard/WizardPassword.qml
parent29f3abdeac0df6cf3cfb4e871d33c68fae03dff8 (diff)
downloadmonzero-gui-78b556575a8b6bcd2fb595dc56260b2c4203f637.tar.gz
monzero-gui-78b556575a8b6bcd2fb595dc56260b2c4203f637.tar.xz
monzero-gui-78b556575a8b6bcd2fb595dc56260b2c4203f637.zip
password page: checking if passwords match. merged "configuration" and
"donation" pages into one
Diffstat (limited to 'wizard/WizardPassword.qml')
-rw-r--r--wizard/WizardPassword.qml62
1 files changed, 18 insertions, 44 deletions
diff --git a/wizard/WizardPassword.qml b/wizard/WizardPassword.qml
index 8c54ad65..2926a9e9 100644
--- a/wizard/WizardPassword.qml
+++ b/wizard/WizardPassword.qml
@@ -38,6 +38,18 @@ Item {
onOpacityChanged: visible = opacity !== 0
+ function handlePassword() {
+ // allow to forward step only if passwords match
+ // print("pass1: ", passwordItem.password)
+ // print("pass2: ", retypePasswordItem.password)
+ // TODO: update password strength
+ wizard.nextButton.visible = passwordItem.password === retypePasswordItem.password
+ }
+
+ property bool passwordValid : passwordItem.password != ''
+ && passwordItem.password === retypePasswordItem.password
+
+
Row {
id: dotsRow
anchors.top: parent.top
@@ -97,36 +109,18 @@ Item {
}
}
- Item {
+
+ WizardPasswordInput {
id: passwordItem
anchors.top: headerColumn.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 24
width: 300
height: 62
-
- TextInput {
- anchors.fill: parent
- horizontalAlignment: TextInput.AlignHCenter
- verticalAlignment: TextInput.AlignVCenter
- font.family: "Arial"
- font.pixelSize: 32
- renderType: Text.NativeRendering
- color: "#35B05A"
- passwordCharacter: "•"
- echoMode: TextInput.Password
- focus: true
- }
-
- Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: 1
- color: "#DBDBDB"
- }
+ onChanged: handlePassword()
}
+
PrivacyLevelSmall {
id: privacyLevel
anchors.left: parent.left
@@ -137,33 +131,13 @@ Item {
interactive: false
}
- Item {
+ WizardPasswordInput {
id: retypePasswordItem
anchors.top: privacyLevel.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 24
width: 300
height: 62
-
- TextInput {
- anchors.fill: parent
- horizontalAlignment: TextInput.AlignHCenter
- verticalAlignment: TextInput.AlignVCenter
- font.family: "Arial"
- font.pixelSize: 32
- renderType: Text.NativeRendering
- color: "#35B05A"
- passwordCharacter: "•"
- echoMode: TextInput.Password
- focus: true
- }
-
- Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: 1
- color: "#DBDBDB"
- }
+ onChanged: handlePassword()
}
}