Files
purple-electrumwallet/electrum/gui/qml/components/wizard/WCImport.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

100 lines
3.4 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import org.electrum 1.0
import "../controls"
WizardComponent {
id: root
securePage: true
valid: false
function apply() {
if (bitcoin.isAddressList(import_ta.text)) {
wizard_data['address_list'] = import_ta.text
} else if (bitcoin.isPrivateKeyList(import_ta.text)) {
wizard_data['private_key_list'] = import_ta.text
}
}
function verify(text) {
return bitcoin.isAddressList(text) || bitcoin.isPrivateKeyList(text)
}
ColumnLayout {
width: parent.width
height: parent.height
InfoTextArea {
Layout.preferredWidth: parent.width
backgroundColor: constants.darkerDialogBackground
text: qsTr('Enter a list of Bitcoin Purple addresses (this will create a watching-only wallet), or a list of private keys.')
}
RowLayout {
Layout.topMargin: constants.paddingMedium
Layout.fillHeight: true
ElTextArea {
id: import_ta
Layout.fillWidth: true
Layout.fillHeight: true
font.family: FixedFont
wrapMode: TextEdit.WrapAnywhere
onTextChanged: valid = verify(text)
inputMethodHints: Qt.ImhSensitiveData | Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
background: PaneInsetBackground {
baseColor: constants.darkerDialogBackground
}
}
ColumnLayout {
Layout.alignment: Qt.AlignTop
ToolButton {
icon.source: '../../../icons/paste.png'
icon.height: constants.iconSizeMedium
icon.width: constants.iconSizeMedium
onClicked: {
if (verify(AppController.clipboardToText())) {
if (import_ta.text != '')
import_ta.text = import_ta.text + '\n'
import_ta.text = import_ta.text + AppController.clipboardToText()
}
}
}
ToolButton {
icon.source: '../../../icons/qrcode.png'
icon.height: constants.iconSizeMedium
icon.width: constants.iconSizeMedium
onClicked: {
var dialog = app.scanDialog.createObject(app, {
hint: bitcoin.isAddressList(import_ta.text)
? qsTr('Scan another address')
: bitcoin.isPrivateKeyList(import_ta.text)
? qsTr('Scan another private key')
: qsTr('Scan a private key or an address')
})
dialog.onFoundText.connect(function(data) {
if (verify(data)) {
if (import_ta.text != '')
import_ta.text = import_ta.text + '\n'
import_ta.text = import_ta.text + data
}
dialog.close()
})
dialog.open()
}
}
}
}
}
Bitcoin {
id: bitcoin
}
}