Files
pallectrum/electrum/gui/qml/components/ChannelOpenProgressDialog.qml
Davide Grilli 64b88fbded Rename Bitcoin to Palladium in UI and codebase
Update all references to "Bitcoin" and "Electrum" in the UI and codebase to "Palladium" and "Pallectrum" respectively. This includes network names, wallet types, error messages, and other user-facing text. Also updates the BIP21 URI scheme from 'bitcoin' to 'palladium'.
2025-11-23 22:09:21 +01:00

128 lines
3.7 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 reset() {
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
}
}
TextHighlightPane {
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
}
InfoTextArea {
id: infoText
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: dialog.width * 2/3
visible: false
textFormat: TextEdit.PlainText
}
}
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 Pallectrum wallet with the same seed.')
})
sharedialog.open()
}
}