Skip to content

Commit

Permalink
qml: Start AddWallet flow when AddWalletButton is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny9 committed Nov 1, 2024
1 parent f655e8d commit 694025a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/qml/pages/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ ApplicationWindow {

Component {
id: desktopWallets
DesktopWallets {}
DesktopWallets {
onAddWallet: {
main.push(createWalletWizard)
}
}
}

Component {
id: createWalletWizard
CreateWalletWizard {
onFinished: {
onFinished: {
main.pop()
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/qml/pages/wallet/DesktopWallets.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Page {

ButtonGroup { id: navigationTabs }

signal addWallet()

header: NavigationBar2 {
id: navBar
leftItem: WalletBadge {
Expand All @@ -40,6 +42,10 @@ Page {
closePolicy: Popup.CloseOnPressOutside
x: 0
y: parent.height

onAddWallet: {
root.addWallet()
}
}
}
centerItem: RowLayout {
Expand Down
6 changes: 6 additions & 0 deletions src/qml/pages/wallet/WalletSelect.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Popup {
implicitWidth: 250
clip: true

signal addWallet()

background: Item {
anchors.fill: parent
Rectangle {
Expand Down Expand Up @@ -90,6 +92,10 @@ Popup {

AddWalletButton {
id: addWallet
onClicked: {
root.addWallet()
root.close()
}
}
}
}

0 comments on commit 694025a

Please sign in to comment.