aboutsummaryrefslogtreecommitdiff
path: root/wizard/WizardController.qml
diff options
context:
space:
mode:
authorrating89us <45968869+rating89us@users.noreply.github.com>2021-08-23 18:09:22 +0200
committerselsta <selsta@sent.at>2023-02-12 23:25:49 +0100
commit198dfb338cb26177763b5fff835a3740b0a4f0c5 (patch)
tree8e5608e824fde049ef9c0a5a37fd44c87dc6611a /wizard/WizardController.qml
parentb7ba9437d8cca6df4ecff7f5ae38a53cac5e26b2 (diff)
downloadmonzero-gui-198dfb338cb26177763b5fff835a3740b0a4f0c5.tar.gz
monzero-gui-198dfb338cb26177763b5fff835a3740b0a4f0c5.tar.xz
monzero-gui-198dfb338cb26177763b5fff835a3740b0a4f0c5.zip
wizard: redesign seed page
- move mnemonic seed - restore height into a separate page - pdf template - seed verification - responsive UI - accessibility
Diffstat (limited to 'wizard/WizardController.qml')
-rw-r--r--wizard/WizardController.qml32
1 files changed, 25 insertions, 7 deletions
diff --git a/wizard/WizardController.qml b/wizard/WizardController.qml
index 593f9c84..0c5ba3eb 100644
--- a/wizard/WizardController.qml
+++ b/wizard/WizardController.qml
@@ -50,13 +50,14 @@ Rectangle {
signal useMoneroClicked()
signal walletCreatedFromDevice(bool success)
- function restart() {
+ function restart(generatingNewSeed) {
// Clear up any state, including `m_wallet`, which
// is the temp. wallet object whilst creating new wallets.
// This function is called automatically by navigating to `wizardHome`.
- wizardStateView.state = "wizardHome"
- wizardController.walletOptionsName = defaultAccountName;
- wizardController.walletOptionsLocation = '';
+ if(!generatingNewSeed) {
+ wizardController.walletOptionsName = defaultAccountName;
+ wizardController.walletOptionsLocation = '';
+ }
wizardController.walletOptionsPassword = '';
wizardController.walletOptionsSeed = '';
wizardController.walletOptionsSeedOffset = '';
@@ -113,10 +114,18 @@ Rectangle {
property int layoutScale: {
- if(appWindow.width < 800){
- return 1;
- } else {
+ if (appWindow.width < 506) {
+ //mobile (25 word mnemonic seed displayed in 2 columns)
+ return 4;
+ } else if (appWindow.width < 660) {
+ //tablet (25 word mnemonic seed displayed in 3 columns)
+ return 3;
+ } else if (appWindow.width < 842) {
+ //tablet (25 word mnemonic seed displayed in 4 columns)
return 2;
+ } else if (appWindow.width >= 842) {
+ //desktop (25 word mnemonic seed displayed in 5 columns)
+ return 1;
}
}
@@ -131,6 +140,7 @@ Rectangle {
property WizardCreateWallet2 wizardCreateWallet2View: WizardCreateWallet2 { }
property WizardCreateWallet3 wizardCreateWallet3View: WizardCreateWallet3 { }
property WizardCreateWallet4 wizardCreateWallet4View: WizardCreateWallet4 { }
+ property WizardCreateWallet5 wizardCreateWallet5View: WizardCreateWallet5 { }
property WizardRestoreWallet1 wizardRestoreWallet1View: WizardRestoreWallet1 { }
property WizardRestoreWallet2 wizardRestoreWallet2View: WizardRestoreWallet2 { }
property WizardRestoreWallet3 wizardRestoreWallet3View: WizardRestoreWallet3 { }
@@ -196,6 +206,10 @@ Rectangle {
PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardCreateWallet4View }
PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet4View.pageHeight + 80 }
}, State {
+ name: "wizardCreateWallet5"
+ PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardCreateWallet5View }
+ PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardCreateWallet5View.pageHeight + 80 }
+ }, State {
name: "wizardRestoreWallet1"
PropertyChanges { target: wizardStateView; currentView: wizardStateView.wizardRestoreWallet1View }
PropertyChanges { target: wizardFlickable; contentHeight: wizardStateView.wizardRestoreWallet1View.pageHeight + 80 }
@@ -356,6 +370,10 @@ Rectangle {
return;
}
+ if (wizardStateView.wizardCreateWallet2View.seedListGrid) {
+ wizardStateView.wizardCreateWallet2View.seedListGrid.destroy();
+ }
+
// make sure temporary wallet files are deleted
console.log("Removing temporary wallet: " + wizardController.tmpWalletFilename)
oshelper.removeTemporaryWallet(wizardController.tmpWalletFilename)