diff options
| author | Ilya Kitaev <mbg033@gmail.com> | 2016-01-26 00:17:55 +0300 |
|---|---|---|
| committer | Ilya Kitaev <mbg033@gmail.com> | 2016-01-26 00:17:55 +0300 |
| commit | 78b556575a8b6bcd2fb595dc56260b2c4203f637 (patch) | |
| tree | d9c7ba9ec13873c37eced9d1b21410f0f918af2e /wizard/WizardMain.qml | |
| parent | 29f3abdeac0df6cf3cfb4e871d33c68fae03dff8 (diff) | |
| download | monzero-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/WizardMain.qml')
| -rw-r--r-- | wizard/WizardMain.qml | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml index 4ad396c6..a20d654c 100644 --- a/wizard/WizardMain.qml +++ b/wizard/WizardMain.qml @@ -31,11 +31,34 @@ import "../components" Rectangle { id: wizard + property alias nextButton : nextButton + + signal useMoneroClicked() border.color: "#DBDBDB" border.width: 1 color: "#FFFFFF" + function switchPage(next) { + if(next === false) { + if(currentPage > 0) { + pages[currentPage].opacity = 0 + pages[--currentPage].opacity = 1 + } + } else { + if(currentPage < pages.length - 1) { + pages[currentPage].opacity = 0 + pages[++currentPage].opacity = 1 + } + } + + // disallow "next" button until password matches + if (pages[currentPage] === passwordPage) { + nextButton.visible = passwordPage.passwordValid + } + } + + Rectangle { id: nextButton anchors.verticalCenter: parent.verticalCenter @@ -62,28 +85,8 @@ Rectangle { } property int currentPage: 0 - function switchPage(next) { - var pages = new Array() - pages[0] = welcomePage - pages[1] = optionsPage - pages[2] = createWalletPage - pages[3] = passwordPage - pages[4] = configurePage - pages[5] = donationPage - pages[6] = finishPage + property var pages: [welcomePage, optionsPage, createWalletPage, passwordPage, /*configurePage,*/ donationPage, finishPage ] - if(next === false) { - if(currentPage > 0) { - pages[currentPage].opacity = 0 - pages[--currentPage].opacity = 1 - } - } else { - if(currentPage < pages.length - 1) { - pages[currentPage].opacity = 0 - pages[++currentPage].opacity = 1 - } - } - } WizardWelcome { id: welcomePage @@ -126,15 +129,15 @@ Rectangle { anchors.rightMargin: 50 } - WizardConfigure { - id: configurePage - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.right: nextButton.left - anchors.left: prevButton.right - anchors.leftMargin: 50 - anchors.rightMargin: 50 - } +// WizardConfigure { +// id: configurePage +// anchors.top: parent.top +// anchors.bottom: parent.bottom +// anchors.right: nextButton.left +// anchors.left: prevButton.right +// anchors.leftMargin: 50 +// anchors.rightMargin: 50 +// } WizardDonation { id: donationPage @@ -192,7 +195,7 @@ Rectangle { shadowPressedColor: "#B32D00" releasedColor: "#FF6C3C" pressedColor: "#FF4304" - visible: parent.currentPage === 6 + visible: parent.pages[currentPage] === finishPage onClicked: wizard.useMoneroClicked() } } |
