Merge pull request #8759 from accumulator/qml_remove_unused
qml remove unused components
This commit is contained in:
@@ -1,108 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Controls
|
|
||||||
import QtQuick.Controls.Material
|
|
||||||
|
|
||||||
import org.electrum 1.0
|
|
||||||
|
|
||||||
import "controls"
|
|
||||||
|
|
||||||
Pane {
|
|
||||||
id: root
|
|
||||||
padding: 0
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: layout
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
GridLayout {
|
|
||||||
id: summaryLayout
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
Layout.topMargin: constants.paddingLarge
|
|
||||||
Layout.leftMargin: constants.paddingLarge
|
|
||||||
Layout.rightMargin: constants.paddingLarge
|
|
||||||
|
|
||||||
columns: 2
|
|
||||||
|
|
||||||
Heading {
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
text: qsTr('Lightning Channel Backups')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Frame {
|
|
||||||
id: channelsFrame
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.topMargin: constants.paddingLarge
|
|
||||||
Layout.bottomMargin: constants.paddingLarge
|
|
||||||
Layout.leftMargin: constants.paddingMedium
|
|
||||||
Layout.rightMargin: constants.paddingMedium
|
|
||||||
|
|
||||||
verticalPadding: 0
|
|
||||||
horizontalPadding: 0
|
|
||||||
background: PaneInsetBackground {}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: listview
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
Layout.fillHeight: true
|
|
||||||
clip: true
|
|
||||||
model: Daemon.currentWallet.channelModel.filterModelBackups()
|
|
||||||
|
|
||||||
delegate: ChannelDelegate {
|
|
||||||
onClicked: {
|
|
||||||
app.stack.push(Qt.resolvedUrl('ChannelDetails.qml'), { channelid: model.cid })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrollIndicator.vertical: ScrollIndicator { }
|
|
||||||
|
|
||||||
Label {
|
|
||||||
visible: listview.model.count == 0
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: listview.width * 4/5
|
|
||||||
font.pixelSize: constants.fontSizeXXLarge
|
|
||||||
color: constants.mutedForeground
|
|
||||||
text: qsTr('No Lightning channel backups present')
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FlatButton {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr('Import channel backup')
|
|
||||||
onClicked: {
|
|
||||||
var dialog = importChannelBackupDialog.createObject(root)
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
icon.source: '../../icons/file.png'
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: Daemon.currentWallet
|
|
||||||
function onImportChannelBackupFailed(message) {
|
|
||||||
var dialog = app.messageDialog.createObject(root, { title: qstr('Error'), text: message })
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
|
||||||
id: importChannelBackupDialog
|
|
||||||
ImportChannelBackupDialog {
|
|
||||||
onClosed: destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -155,7 +155,6 @@ Pane {
|
|||||||
}
|
}
|
||||||
icon.source: '../../icons/lightning.png'
|
icon.source: '../../icons/lightning.png'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -167,19 +166,4 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: importChannelBackupDialog
|
|
||||||
ImportChannelBackupDialog {
|
|
||||||
onClosed: destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: Daemon.currentWallet
|
|
||||||
function onImportChannelBackupFailed(message) {
|
|
||||||
var dialog = app.messageDialog.createObject(root, { title: qsTr('Error'), text: message })
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,125 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Controls
|
|
||||||
import QtQuick.Controls.Material
|
|
||||||
|
|
||||||
import org.electrum 1.0
|
|
||||||
|
|
||||||
import "controls"
|
|
||||||
|
|
||||||
ElDialog {
|
|
||||||
id: dialog
|
|
||||||
|
|
||||||
required property string invoice_key
|
|
||||||
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
title: qsTr('Paying Lightning Invoice...')
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: s
|
|
||||||
state: ''
|
|
||||||
states: [
|
|
||||||
State {
|
|
||||||
name: ''
|
|
||||||
},
|
|
||||||
State {
|
|
||||||
name: 'success'
|
|
||||||
PropertyChanges { target: spinner; running: false }
|
|
||||||
PropertyChanges { target: helpText; text: qsTr('Paid!') }
|
|
||||||
PropertyChanges { target: icon; source: '../../icons/confirmed.png' }
|
|
||||||
},
|
|
||||||
State {
|
|
||||||
name: 'failed'
|
|
||||||
PropertyChanges { target: spinner; running: false }
|
|
||||||
PropertyChanges { target: helpText; text: qsTr('Payment failed') }
|
|
||||||
PropertyChanges { target: errorText; visible: true }
|
|
||||||
PropertyChanges { target: icon; source: '../../icons/warning.png' }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
from: ''
|
|
||||||
to: 'success'
|
|
||||||
PropertyAnimation { target: helpText; properties: 'text'; duration: 0}
|
|
||||||
NumberAnimation { target: icon; properties: 'opacity'; from: 0; to: 1; duration: 200 }
|
|
||||||
NumberAnimation { target: icon; properties: 'scale'; from: 0; to: 1; duration: 500
|
|
||||||
easing.type: Easing.OutBack
|
|
||||||
easing.overshoot: 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: ''
|
|
||||||
to: 'failed'
|
|
||||||
PropertyAnimation { target: helpText; properties: 'text'; duration: 0}
|
|
||||||
NumberAnimation { target: icon; properties: 'opacity'; from: 0; to: 1; duration: 500 }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: content
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.preferredWidth: constants.iconSizeXXLarge
|
|
||||||
Layout.preferredHeight: constants.iconSizeXXLarge
|
|
||||||
|
|
||||||
BusyIndicator {
|
|
||||||
id: spinner
|
|
||||||
visible: s.state == ''
|
|
||||||
width: constants.iconSizeXXLarge
|
|
||||||
height: constants.iconSizeXXLarge
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: icon
|
|
||||||
width: constants.iconSizeXXLarge
|
|
||||||
height: constants.iconSizeXXLarge
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: helpText
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
text: qsTr('Paying...')
|
|
||||||
font.pixelSize: constants.fontSizeXXLarge
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: errorText
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
font.pixelSize: constants.fontSizeLarge
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: Daemon.currentWallet
|
|
||||||
function onPaymentSucceeded(key) {
|
|
||||||
if (key != invoice_key) {
|
|
||||||
console.log('wrong invoice ' + key + ' != ' + invoice_key)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
console.log('payment succeeded!')
|
|
||||||
s.state = 'success'
|
|
||||||
}
|
|
||||||
function onPaymentFailed(key, reason) {
|
|
||||||
if (key != invoice_key) {
|
|
||||||
console.log('wrong invoice ' + key + ' != ' + invoice_key)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
console.log('payment failed: ' + reason)
|
|
||||||
s.state = 'failed'
|
|
||||||
errorText.text = reason
|
|
||||||
}
|
|
||||||
function onPaymentAuthRejected() {
|
|
||||||
dialog.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -584,13 +584,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: lightningPaymentProgressDialog
|
|
||||||
LightningPaymentProgressDialog {
|
|
||||||
onClosed: destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: lnurlPayDialog
|
id: lnurlPayDialog
|
||||||
LnurlPayRequestDialog {
|
LnurlPayRequestDialog {
|
||||||
|
|||||||
@@ -55,27 +55,27 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
dataChanged = pyqtSignal()
|
dataChanged = pyqtSignal()
|
||||||
|
|
||||||
balanceChanged = pyqtSignal()
|
balanceChanged = pyqtSignal()
|
||||||
requestStatusChanged = pyqtSignal([str,int], arguments=['key','status'])
|
requestStatusChanged = pyqtSignal([str, int], arguments=['key', 'status'])
|
||||||
requestCreateSuccess = pyqtSignal([str], arguments=['key'])
|
requestCreateSuccess = pyqtSignal([str], arguments=['key'])
|
||||||
requestCreateError = pyqtSignal([str], arguments=['error'])
|
requestCreateError = pyqtSignal([str], arguments=['error'])
|
||||||
invoiceStatusChanged = pyqtSignal([str,int], arguments=['key','status'])
|
invoiceStatusChanged = pyqtSignal([str, int], arguments=['key', 'status'])
|
||||||
invoiceCreateSuccess = pyqtSignal()
|
invoiceCreateSuccess = pyqtSignal()
|
||||||
invoiceCreateError = pyqtSignal([str,str], arguments=['code','error'])
|
invoiceCreateError = pyqtSignal([str, str], arguments=['code', 'error'])
|
||||||
paymentAuthRejected = pyqtSignal()
|
paymentAuthRejected = pyqtSignal()
|
||||||
paymentSucceeded = pyqtSignal([str], arguments=['key'])
|
paymentSucceeded = pyqtSignal([str], arguments=['key'])
|
||||||
paymentFailed = pyqtSignal([str,str], arguments=['key','reason'])
|
paymentFailed = pyqtSignal([str, str], arguments=['key', 'reason'])
|
||||||
requestNewPassword = pyqtSignal()
|
requestNewPassword = pyqtSignal()
|
||||||
signSucceeded = pyqtSignal([str], arguments=['txid'])
|
signSucceeded = pyqtSignal([str], arguments=['txid'])
|
||||||
signFailed = pyqtSignal([str], arguments=['message'])
|
signFailed = pyqtSignal([str], arguments=['message'])
|
||||||
broadcastSucceeded = pyqtSignal([str], arguments=['txid'])
|
broadcastSucceeded = pyqtSignal([str], arguments=['txid'])
|
||||||
broadcastFailed = pyqtSignal([str,str,str], arguments=['txid','code','reason'])
|
broadcastFailed = pyqtSignal([str, str, str], arguments=['txid', 'code', 'reason'])
|
||||||
saveTxSuccess = pyqtSignal([str], arguments=['txid'])
|
saveTxSuccess = pyqtSignal([str], arguments=['txid'])
|
||||||
saveTxError = pyqtSignal([str,str,str], arguments=['txid', 'code', 'message'])
|
saveTxError = pyqtSignal([str, str, str], arguments=['txid', 'code', 'message'])
|
||||||
importChannelBackupFailed = pyqtSignal([str], arguments=['message'])
|
importChannelBackupFailed = pyqtSignal([str], arguments=['message'])
|
||||||
labelsUpdated = pyqtSignal()
|
labelsUpdated = pyqtSignal()
|
||||||
otpRequested = pyqtSignal()
|
otpRequested = pyqtSignal()
|
||||||
otpSuccess = pyqtSignal()
|
otpSuccess = pyqtSignal()
|
||||||
otpFailed = pyqtSignal([str,str], arguments=['code','message'])
|
otpFailed = pyqtSignal([str, str], arguments=['code', 'message'])
|
||||||
peersUpdated = pyqtSignal()
|
peersUpdated = pyqtSignal()
|
||||||
seedRetrieved = pyqtSignal()
|
seedRetrieved = pyqtSignal()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user