-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qml: Introduce Create Wallet Single-Sig flow
- Loading branch information
Showing
22 changed files
with
615 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright (c) 2022 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
|
||
TextField { | ||
id: root | ||
|
||
property bool hideText: false | ||
|
||
implicitHeight: 56 | ||
implicitWidth: 450 | ||
font.family: "Inter" | ||
font.styleName: "Regular" | ||
font.pixelSize: 18 | ||
color: Theme.color.neutral9 | ||
placeholderTextColor: Theme.color.neutral5 | ||
echoMode: hideText ? TextInput.Password : TextInput.Normal | ||
rightPadding: hideText ? 46 : 20 | ||
leftPadding: 20 | ||
background: Rectangle { | ||
border.color: Theme.color.neutral5 | ||
border.width: 1 | ||
color: "transparent" | ||
radius: 5 | ||
|
||
Icon { | ||
id: visibleIcon | ||
enabled: hideText | ||
visible: hideText | ||
anchors.right: parent.right | ||
anchors.rightMargin: 12 | ||
size: 24 | ||
anchors.verticalCenter: parent.verticalCenter | ||
source: "qrc:/icons/visible" | ||
color: Theme.color.neutral5 | ||
onClicked: { | ||
if (root.echoMode == TextInput.Password) { | ||
root.echoMode = TextInput.Normal | ||
visibleIcon.source = "qrc:/icons/hidden" | ||
} else { | ||
root.echoMode = TextInput.Password | ||
visibleIcon.source = "qrc:/icons/visible" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// Copyright (c) 2024 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import "../../controls" | ||
import "../../components" | ||
import "../settings" | ||
|
||
Page { | ||
id: root | ||
background: null | ||
|
||
header: NavigationBar2 { | ||
id: navbar | ||
leftItem: NavButton { | ||
iconSource: "image://images/caret-left" | ||
text: qsTr("Back") | ||
onClicked: { | ||
root.StackView.view.pop() | ||
} | ||
} | ||
} | ||
|
||
ColumnLayout { | ||
id: columnLayout | ||
width: Math.min(parent.width, 450) | ||
anchors.horizontalCenter: parent.horizontalCenter | ||
|
||
Item { | ||
Layout.alignment: Qt.AlignCenter | ||
Layout.preferredHeight: circle.height | ||
Layout.preferredWidth: circle.width | ||
Rectangle { | ||
id: circle | ||
width: 60 | ||
height: width | ||
radius: width / 2 | ||
color: Theme.color.blue | ||
} | ||
Icon { | ||
source: "image://images/wallet" | ||
color: Theme.color.white | ||
width: 30 | ||
height: width | ||
anchors.centerIn: circle | ||
} | ||
} | ||
|
||
Header { | ||
Layout.topMargin: 20 | ||
Layout.leftMargin: 20 | ||
Layout.rightMargin: 20 | ||
header: qsTr("Back up your wallet") | ||
description: qsTr("Your wallet is a file stored on your hard disk.\nTo prevent accidental loss, it is recommended you keep a copy of your wallet file in a secure place, like a dedicated USB Drive.") | ||
} | ||
|
||
ContinueButton { | ||
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin) | ||
Layout.topMargin: 30 | ||
Layout.leftMargin: 20 | ||
Layout.rightMargin: Layout.leftMargin | ||
Layout.alignment: Qt.AlignCenter | ||
text: qsTr("View file") | ||
borderColor: Theme.color.neutral6 | ||
borderHoverColor: Theme.color.orangeLight1 | ||
borderPressedColor: Theme.color.orangeLight2 | ||
textColor: Theme.color.orange | ||
backgroundColor: "transparent" | ||
backgroundHoverColor: "transparent" | ||
backgroundPressedColor: "transparent" | ||
} | ||
|
||
ContinueButton { | ||
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin) | ||
Layout.topMargin: 30 | ||
Layout.leftMargin: 20 | ||
Layout.rightMargin: Layout.leftMargin | ||
Layout.alignment: Qt.AlignCenter | ||
text: qsTr("Done") | ||
onClicked: { | ||
root.StackView.view.finished() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// Copyright (c) 2024 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import "../../controls" | ||
import "../../components" | ||
import "../settings" | ||
|
||
Page { | ||
id: root | ||
background: null | ||
|
||
header: NavigationBar2 { | ||
id: navbar | ||
leftItem: NavButton { | ||
iconSource: "image://images/caret-left" | ||
text: qsTr("Back") | ||
onClicked: { | ||
root.StackView.view.pop() | ||
} | ||
} | ||
} | ||
|
||
ColumnLayout { | ||
id: columnLayout | ||
width: Math.min(parent.width, 450) | ||
anchors.horizontalCenter: parent.horizontalCenter | ||
|
||
Item { | ||
Layout.alignment: Qt.AlignCenter | ||
Layout.preferredHeight: circle.height | ||
Layout.preferredWidth: circle.width | ||
Rectangle { | ||
id: circle | ||
width: 60 | ||
height: width | ||
radius: width / 2 | ||
color: Theme.color.green | ||
} | ||
Icon { | ||
source: "image://images/wallet" | ||
color: Theme.color.white | ||
width: 30 | ||
height: width | ||
anchors.centerIn: circle | ||
} | ||
} | ||
|
||
Header { | ||
Layout.topMargin: 20 | ||
Layout.leftMargin: 20 | ||
Layout.rightMargin: 20 | ||
header: qsTr("Your wallet has been created") | ||
description: qsTr("It is good practice to make a small test transaction before you actively use this wallet for larger amounts.") | ||
} | ||
|
||
ContinueButton { | ||
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin) | ||
Layout.topMargin: 30 | ||
Layout.leftMargin: 20 | ||
Layout.rightMargin: Layout.leftMargin | ||
Layout.alignment: Qt.AlignCenter | ||
text: qsTr("Next") | ||
onClicked: { | ||
root.StackView.view.push("qrc:/qml/pages/wallet/CreateBackup.qml") | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.