mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-06 01:42:06 +02:00
wizard: Reset password and account name fields on wizard restart
This commit is contained in:
parent
26abdee5c4
commit
6ca4e05167
@ -44,6 +44,11 @@ Item {
|
|||||||
|
|
||||||
onOpacityChanged: visible = opacity !== 0
|
onOpacityChanged: visible = opacity !== 0
|
||||||
|
|
||||||
|
function onWizardRestarted() {
|
||||||
|
// reset account name field
|
||||||
|
uiItem.accountNameText = defaultAccountName
|
||||||
|
}
|
||||||
|
|
||||||
//! function called each time we display this page
|
//! function called each time we display this page
|
||||||
|
|
||||||
function onPageOpened(settingsOblect) {
|
function onPageOpened(settingsOblect) {
|
||||||
@ -98,4 +103,8 @@ Item {
|
|||||||
wordsTextItem.memoTextReadOnly: true
|
wordsTextItem.memoTextReadOnly: true
|
||||||
restoreHeightVisible:false
|
restoreHeightVisible:false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
parent.wizardRestarted.connect(onWizardRestarted)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ Rectangle {
|
|||||||
property string currentPath: "create_wallet"
|
property string currentPath: "create_wallet"
|
||||||
property var pages: paths[currentPath]
|
property var pages: paths[currentPath]
|
||||||
|
|
||||||
|
signal wizardRestarted();
|
||||||
signal useMoneroClicked()
|
signal useMoneroClicked()
|
||||||
signal openWalletFromFileClicked()
|
signal openWalletFromFileClicked()
|
||||||
border.color: "#DBDBDB"
|
border.color: "#DBDBDB"
|
||||||
@ -60,6 +61,7 @@ Rectangle {
|
|||||||
wizard.settings = ({})
|
wizard.settings = ({})
|
||||||
wizard.currentPath = "create_wallet"
|
wizard.currentPath = "create_wallet"
|
||||||
wizard.pages = paths[currentPath]
|
wizard.pages = paths[currentPath]
|
||||||
|
wizardRestarted();
|
||||||
|
|
||||||
//hide all pages except first
|
//hide all pages except first
|
||||||
for (var i = 1; i < wizard.pages.length; i++){
|
for (var i = 1; i < wizard.pages.length; i++){
|
||||||
|
@ -64,6 +64,12 @@ Item {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onWizardRestarted(){
|
||||||
|
// Reset password fields
|
||||||
|
passwordItem.password = "";
|
||||||
|
retypePasswordItem.password = "";
|
||||||
|
}
|
||||||
|
|
||||||
function handlePassword() {
|
function handlePassword() {
|
||||||
// allow to forward step only if passwords match
|
// allow to forward step only if passwords match
|
||||||
|
|
||||||
@ -178,6 +184,6 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.log
|
parent.wizardRestarted.connect(onWizardRestarted)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,11 @@ Item {
|
|||||||
|
|
||||||
onOpacityChanged: visible = opacity !== 0
|
onOpacityChanged: visible = opacity !== 0
|
||||||
|
|
||||||
|
function onWizardRestarted() {
|
||||||
|
// reset account name field
|
||||||
|
uiItem.accountNameText = defaultAccountName
|
||||||
|
}
|
||||||
|
|
||||||
function onPageOpened(settingsObject) {
|
function onPageOpened(settingsObject) {
|
||||||
checkNextButton();
|
checkNextButton();
|
||||||
// Empty seedText when restoring multiple times in one session
|
// Empty seedText when restoring multiple times in one session
|
||||||
@ -95,4 +100,8 @@ Item {
|
|||||||
checkNextButton();
|
checkNextButton();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
parent.wizardRestarted.connect(onWizardRestarted)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user