Skip to content

Commit 2d2be8c

Browse files
committed
qml: Start AddWallet flow when AddWalletButton is clicked
1 parent b2c1a15 commit 2d2be8c

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

src/qml/pages/main.qml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,17 @@ ApplicationWindow {
8080

8181
Component {
8282
id: desktopWallets
83-
DesktopWallets {}
83+
DesktopWallets {
84+
onAddWallet: {
85+
main.push(createWalletWizard)
86+
}
87+
}
8488
}
8589

8690
Component {
8791
id: createWalletWizard
8892
CreateWalletWizard {
89-
onFinished: {
93+
onFinished: {
9094
main.pop()
9195
}
9296
}

src/qml/pages/wallet/DesktopWallets.qml

Lines changed: 6 additions & 0 deletions
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 {
@@ -41,6 +43,10 @@ Page {
4143
closePolicy: Popup.CloseOnPressOutside
4244
x: 0
4345
y: parent.height
46+
47+
onAddWallet: {
48+
root.addWallet()
49+
}
4450
}
4551
}
4652
centerItem: RowLayout {

src/qml/pages/wallet/WalletSelect.qml

Lines changed: 6 additions & 0 deletions
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 {
@@ -95,6 +97,10 @@ Popup {
9597
Layout.alignment: Qt.AlignHCenter
9698
Layout.preferredWidth: 220
9799
Layout.preferredHeight: 30
100+
onClicked: {
101+
root.addWallet()
102+
root.close()
103+
}
98104
}
99105
}
100106
}

0 commit comments

Comments
 (0)