Skip to content

Commit 4b79351

Browse files
committed
qml: Start AddWallet flow when AddWalletButton is clicked
1 parent 032971d commit 4b79351

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/qml/pages/main.qml

+7-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ApplicationWindow {
8181
optionsModel.onboard()
8282
if (AppMode.walletEnabled && AppMode.isDesktop) {
8383
main.push(desktopWallets)
84-
main.push(addWallet)
84+
main.push(addWalletFlow)
8585
} else {
8686
main.push(node)
8787
}
@@ -91,11 +91,15 @@ ApplicationWindow {
9191

9292
Component {
9393
id: desktopWallets
94-
DesktopWallets {}
94+
DesktopWallets {
95+
onAddWallet: {
96+
main.push(addWalletFlow)
97+
}
98+
}
9599
}
96100

97101
Component {
98-
id: addWallet
102+
id: addWalletFlow
99103
AddWallet {
100104
onFinished: {
101105
main.pop()

src/qml/pages/wallet/DesktopWallets.qml

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Page {
1919

2020
ButtonGroup { id: navigationTabs }
2121

22+
signal addWallet()
23+
2224
header: NavigationBar2 {
2325
id: navBar
2426
leftItem: WalletBadge {
@@ -40,6 +42,10 @@ Page {
4042
closePolicy: Popup.CloseOnPressOutside
4143
x: 0
4244
y: parent.height
45+
46+
onAddWallet: {
47+
root.addWallet()
48+
}
4349
}
4450
}
4551
centerItem: RowLayout {

src/qml/pages/wallet/WalletSelect.qml

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Popup {
1616
implicitWidth: 250
1717
clip: true
1818

19+
signal addWallet()
20+
1921
background: Item {
2022
anchors.fill: parent
2123
Rectangle {
@@ -89,6 +91,10 @@ Popup {
8991

9092
AddWalletButton {
9193
id: addWallet
94+
onClicked: {
95+
root.addWallet()
96+
root.close()
97+
}
9298
}
9399
}
94100
}

0 commit comments

Comments
 (0)