From 694025a8b4d202a6edf91d59e9c3c9d0c24314ab Mon Sep 17 00:00:00 2001 From: johnny9 <985648+johnny9@users.noreply.github.com> Date: Sat, 24 Aug 2024 00:41:11 -0400 Subject: [PATCH] qml: Start AddWallet flow when AddWalletButton is clicked --- src/qml/pages/main.qml | 8 ++++++-- src/qml/pages/wallet/DesktopWallets.qml | 6 ++++++ src/qml/pages/wallet/WalletSelect.qml | 6 ++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/qml/pages/main.qml b/src/qml/pages/main.qml index 428e5f7527..b2a3d2bf02 100644 --- a/src/qml/pages/main.qml +++ b/src/qml/pages/main.qml @@ -108,13 +108,17 @@ ApplicationWindow { Component { id: desktopWallets - DesktopWallets {} + DesktopWallets { + onAddWallet: { + main.push(createWalletWizard) + } + } } Component { id: createWalletWizard CreateWalletWizard { - onFinished: { + onFinished: { main.pop() } } diff --git a/src/qml/pages/wallet/DesktopWallets.qml b/src/qml/pages/wallet/DesktopWallets.qml index 59a7ac15e4..f823623989 100644 --- a/src/qml/pages/wallet/DesktopWallets.qml +++ b/src/qml/pages/wallet/DesktopWallets.qml @@ -19,6 +19,8 @@ Page { ButtonGroup { id: navigationTabs } + signal addWallet() + header: NavigationBar2 { id: navBar leftItem: WalletBadge { @@ -40,6 +42,10 @@ Page { closePolicy: Popup.CloseOnPressOutside x: 0 y: parent.height + + onAddWallet: { + root.addWallet() + } } } centerItem: RowLayout { diff --git a/src/qml/pages/wallet/WalletSelect.qml b/src/qml/pages/wallet/WalletSelect.qml index 7fdd707c50..72e33c513a 100644 --- a/src/qml/pages/wallet/WalletSelect.qml +++ b/src/qml/pages/wallet/WalletSelect.qml @@ -16,6 +16,8 @@ Popup { implicitWidth: 250 clip: true + signal addWallet() + background: Item { anchors.fill: parent Rectangle { @@ -90,6 +92,10 @@ Popup { AddWalletButton { id: addWallet + onClicked: { + root.addWallet() + root.close() + } } } }