aboutsummaryrefslogtreecommitdiff
path: root/wizard
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-12-09 00:10:05 +0200
committerRiccardo Spagni <ric@spagni.net>2016-12-09 00:10:05 +0200
commitca5c67cac218e474912ebf8360ad3db282c9a3db (patch)
treeab2c40c30eac2ed87442f6fdb832c00a75a69b2a /wizard
parent838845d8787103b058a047fb6ce7461ac028a4f6 (diff)
parent6ca4e05167ce64f746e92254baecc80c76ef7782 (diff)
downloadmonzero-gui-ca5c67cac218e474912ebf8360ad3db282c9a3db.tar.gz
monzero-gui-ca5c67cac218e474912ebf8360ad3db282c9a3db.tar.xz
monzero-gui-ca5c67cac218e474912ebf8360ad3db282c9a3db.zip
Merge pull request #248
6ca4e05 wizard: Reset password and account name fields on wizard restart (Jaquee)
Diffstat (limited to 'wizard')
-rw-r--r--wizard/WizardCreateWallet.qml9
-rw-r--r--wizard/WizardMain.qml2
-rw-r--r--wizard/WizardPassword.qml8
-rw-r--r--wizard/WizardRecoveryWallet.qml9
4 files changed, 27 insertions, 1 deletions
diff --git a/wizard/WizardCreateWallet.qml b/wizard/WizardCreateWallet.qml
index 11d91e24..81ee9ba7 100644
--- a/wizard/WizardCreateWallet.qml
+++ b/wizard/WizardCreateWallet.qml
@@ -44,6 +44,11 @@ Item {
onOpacityChanged: visible = opacity !== 0
+ function onWizardRestarted() {
+ // reset account name field
+ uiItem.accountNameText = defaultAccountName
+ }
+
//! function called each time we display this page
function onPageOpened(settingsOblect) {
@@ -98,4 +103,8 @@ Item {
wordsTextItem.memoTextReadOnly: true
restoreHeightVisible:false
}
+
+ Component.onCompleted: {
+ parent.wizardRestarted.connect(onWizardRestarted)
+ }
}
diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml
index c57727e7..eabbec8e 100644
--- a/wizard/WizardMain.qml
+++ b/wizard/WizardMain.qml
@@ -49,6 +49,7 @@ Rectangle {
property string currentPath: "create_wallet"
property var pages: paths[currentPath]
+ signal wizardRestarted();
signal useMoneroClicked()
signal openWalletFromFileClicked()
border.color: "#DBDBDB"
@@ -60,6 +61,7 @@ Rectangle {
wizard.settings = ({})
wizard.currentPath = "create_wallet"
wizard.pages = paths[currentPath]
+ wizardRestarted();
//hide all pages except first
for (var i = 1; i < wizard.pages.length; i++){
diff --git a/wizard/WizardPassword.qml b/wizard/WizardPassword.qml
index 8645a300..3c66f83c 100644
--- a/wizard/WizardPassword.qml
+++ b/wizard/WizardPassword.qml
@@ -64,6 +64,12 @@ Item {
return true
}
+ function onWizardRestarted(){
+ // Reset password fields
+ passwordItem.password = "";
+ retypePasswordItem.password = "";
+ }
+
function handlePassword() {
// allow to forward step only if passwords match
@@ -178,6 +184,6 @@ Item {
}
Component.onCompleted: {
- console.log
+ parent.wizardRestarted.connect(onWizardRestarted)
}
}
diff --git a/wizard/WizardRecoveryWallet.qml b/wizard/WizardRecoveryWallet.qml
index 55f61475..c5ff8bc9 100644
--- a/wizard/WizardRecoveryWallet.qml
+++ b/wizard/WizardRecoveryWallet.qml
@@ -41,6 +41,11 @@ Item {
onOpacityChanged: visible = opacity !== 0
+ function onWizardRestarted() {
+ // reset account name field
+ uiItem.accountNameText = defaultAccountName
+ }
+
function onPageOpened(settingsObject) {
checkNextButton();
// Empty seedText when restoring multiple times in one session
@@ -95,4 +100,8 @@ Item {
checkNextButton();
}
}
+
+ Component.onCompleted: {
+ parent.wizardRestarted.connect(onWizardRestarted)
+ }
}