Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions qml/bitcoin_qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<file>components/ThemeSettings.qml</file>
<file>components/TotalBytesIndicator.qml</file>
<file>components/Tooltip.qml</file>
<file>components/WalletMigrationPopup.qml</file>
<file>components/WalletPassphrasePopup.qml</file>
<file>controls/AddWalletButton.qml</file>
<file>controls/CaretRightIcon.qml</file>
<file>controls/ContinueButton.qml</file>
Expand Down
3 changes: 3 additions & 0 deletions qml/components/BitcoinAddressInputField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ColumnLayout {
property string errorText: ""
property string labelText: qsTr("Send to")
property bool enabled: true
property alias text: addressInput.text
property string inputObjectName: ""

signal editingFinished()

Expand All @@ -40,6 +42,7 @@ ColumnLayout {

TextArea {
id: addressInput
objectName: root.inputObjectName
anchors.left: label.right
anchors.right: parent.right
anchors.top: parent.top
Expand Down
107 changes: 107 additions & 0 deletions qml/components/WalletMigrationPopup.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// Copyright (c) 2026 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"

Popup {
id: root

property string popupObjectName: ""
property string titleText: qsTr("Wallet update required")
property string descriptionText: ""
property string confirmText: qsTr("Update wallet")
property string busyConfirmText: qsTr("Updating...")
property string errorText: ""
property string errorTextObjectName: ""
property string cancelButtonObjectName: ""
property string confirmButtonObjectName: ""
property bool busy: false

signal confirmed()

objectName: popupObjectName
modal: true
padding: 0
implicitWidth: 420
implicitHeight: columnLayout.implicitHeight
anchors.centerIn: parent

background: Rectangle {
color: Theme.color.background
radius: 10
border.color: Theme.color.neutral4
border.width: 1
}

ColumnLayout {
id: columnLayout
anchors.fill: parent
spacing: 0

CoreText {
Layout.fillWidth: true
Layout.preferredHeight: 56
text: root.titleText
bold: true
font.pixelSize: 24
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}

Separator {
Layout.fillWidth: true
}

Header {
Layout.fillWidth: true
Layout.margins: 20
Layout.topMargin: 20
header: root.descriptionText
headerBold: false
headerSize: 16
}

CoreText {
objectName: root.errorTextObjectName
Layout.fillWidth: true
Layout.leftMargin: 20
Layout.rightMargin: 20
Layout.topMargin: 4
visible: text.length > 0
text: root.errorText
color: Theme.color.red
font.pixelSize: 15
wrapMode: Text.WordWrap
}

RowLayout {
Layout.fillWidth: true
Layout.margins: 20
Layout.topMargin: 20
spacing: 15

OutlineButton {
objectName: root.cancelButtonObjectName
Layout.fillWidth: true
Layout.minimumWidth: 120
enabled: !root.busy
text: qsTr("Cancel")
onClicked: root.close()
}

ContinueButton {
objectName: root.confirmButtonObjectName
Layout.fillWidth: true
Layout.minimumWidth: 120
enabled: !root.busy
text: root.busy ? root.busyConfirmText : root.confirmText
onClicked: root.confirmed()
}
}
}
}
123 changes: 123 additions & 0 deletions qml/components/WalletPassphrasePopup.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// Copyright (c) 2026 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"

Popup {
id: root

property string popupObjectName: ""
property string titleText: qsTr("Enter wallet password")
property string descriptionText: ""
property string confirmText: qsTr("Continue")
property string busyConfirmText: qsTr("Working...")
property string errorText: ""
property string passphraseFieldObjectName: ""
property string errorTextObjectName: ""
property string cancelButtonObjectName: ""
property string confirmButtonObjectName: ""
property bool busy: false

signal submitted(string passphrase)

objectName: popupObjectName
modal: true
padding: 0
implicitWidth: 420
implicitHeight: columnLayout.implicitHeight
anchors.centerIn: parent

onOpened: {
passphraseField.text = ""
passphraseField.forceActiveFocus()
}

background: Rectangle {
color: Theme.color.background
radius: 10
border.color: Theme.color.neutral4
border.width: 1
}

ColumnLayout {
id: columnLayout
anchors.fill: parent
spacing: 0

CoreText {
Layout.fillWidth: true
Layout.preferredHeight: 56
text: root.titleText
bold: true
font.pixelSize: 24
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}

Separator {
Layout.fillWidth: true
}

Header {
Layout.fillWidth: true
Layout.margins: 20
Layout.topMargin: 20
header: root.descriptionText
headerBold: false
headerSize: 16
}

CoreTextField {
id: passphraseField
objectName: root.passphraseFieldObjectName
Layout.fillWidth: true
Layout.leftMargin: 20
Layout.rightMargin: 20
hideText: true
placeholderText: qsTr("Enter password...")
}

CoreText {
objectName: root.errorTextObjectName
Layout.fillWidth: true
Layout.leftMargin: 20
Layout.rightMargin: 20
Layout.topMargin: 12
visible: text.length > 0
text: root.errorText
color: Theme.color.red
font.pixelSize: 15
wrapMode: Text.WordWrap
}

RowLayout {
Layout.fillWidth: true
Layout.margins: 20
Layout.topMargin: 20
spacing: 15

OutlineButton {
objectName: root.cancelButtonObjectName
Layout.fillWidth: true
Layout.minimumWidth: 120
enabled: !root.busy
text: qsTr("Cancel")
onClicked: root.close()
}

ContinueButton {
objectName: root.confirmButtonObjectName
Layout.fillWidth: true
Layout.minimumWidth: 120
enabled: !root.busy && passphraseField.text.length > 0
text: root.busy ? root.busyConfirmText : root.confirmText
onClicked: root.submitted(passphraseField.text)
}
}
}
}
Loading
Loading