Files
purple-electrumwallet/electrum/gui/qml/components/ChannelOpenProgressDialog.qml
T
davide fe226c4bf5 ui: replace Bitcoin/Electrum branding with Bitcoin Purple/Electrum Purple in dialogs
Replace all user-visible "Bitcoin" and "Electrum" strings across Qt and QML
GUIs with "Bitcoin Purple" and "Electrum Purple" respectively. Update the
Help menu: replace the Bitcoin Paper link with the Bitcoin Purple whitepaper
and point the official website to bitcoinpurpleblockchain.com. Remove the
"Distributed by Electrum Technologies GmbH" attribution from the About dialog.
No code identifiers, class names or technical references were modified.
2026-05-08 10:58:55 +02:00

130 lines
3.8 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Controls.Material
import org.electrum 1.0
import "controls"
ElDialog {
id: dialog
width: parent.width
height: parent.height
title: qsTr('Opening Channel...')
allowClose: false
property alias state: s.state
property alias error: errorText.text
property alias info: infoText.text
property alias peer: peerText.text
property string channelBackup
function resetDialog() {
state = ''
errorText.text = ''
peerText.text = ''
channelBackup = ''
}
Item {
id: s
state: ''
states: [
State {
name: 'success'
PropertyChanges { target: dialog; allowClose: true }
PropertyChanges { target: stateText; text: qsTr('Success!') }
PropertyChanges { target: infoText; visible: true }
PropertyChanges { target: icon; source: '../../icons/confirmed.png' }
},
State {
name: 'failed'
PropertyChanges { target: dialog; allowClose: true }
PropertyChanges { target: stateText; text: qsTr('Problem opening channel') }
PropertyChanges { target: errorText; visible: true }
PropertyChanges { target: icon; source: '../../icons/warning.png' }
}
]
}
ColumnLayout {
id: content
anchors.centerIn: parent
width: parent.width
spacing: constants.paddingLarge
RowLayout {
Layout.alignment: Qt.AlignHCenter
Image {
id: icon
source: ''
visible: source != ''
Layout.preferredWidth: constants.iconSizeLarge
Layout.preferredHeight: constants.iconSizeLarge
}
BusyIndicator {
id: spinner
running: visible
visible: s.state == ''
Layout.preferredWidth: constants.iconSizeLarge
Layout.preferredHeight: constants.iconSizeLarge
}
Label {
id: stateText
text: qsTr('Opening Channel...')
font.pixelSize: constants.fontSizeXXLarge
}
}
DialogHighlightPane {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: dialog.width * 3/4
Label {
id: peerText
font.pixelSize: constants.fontSizeMedium
width: parent.width
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
}
}
InfoTextArea {
id: errorText
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: dialog.width * 2/3
visible: false
iconStyle: InfoTextArea.IconStyle.Error
textFormat: TextEdit.PlainText
backgroundColor: constants.darkerDialogBackground
}
InfoTextArea {
id: infoText
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: dialog.width * 2/3
visible: false
textFormat: TextEdit.PlainText
backgroundColor: constants.darkerDialogBackground
}
}
onClosed: {
if (!dialog.channelBackup)
return
var sharedialog = app.genericShareDialog.createObject(app, {
title: qsTr('Save Channel Backup'),
text_qr: dialog.channelBackup,
text_help: qsTr('The channel you created is not recoverable from seed.')
+ ' ' + qsTr('To prevent fund losses, please save this backup on another device.')
+ ' ' + qsTr('It may be imported in another Electrum Purple wallet with the same seed.')
})
sharedialog.open()
}
}