qml: use only genericsharedialog component defined in main
This commit is contained in:
@@ -83,7 +83,9 @@ Pane {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = share.createObject(root, { 'title': qsTr('Address'), 'text': root.address })
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Address'), text: root.address }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -176,7 +178,9 @@ Pane {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = share.createObject(root, { 'title': qsTr('Public key'), 'text': modelData })
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Public key'), text: modelData }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -260,9 +264,4 @@ Pane {
|
||||
onFrozenChanged: addressDetailsChanged()
|
||||
onLabelChanged: addressDetailsChanged()
|
||||
}
|
||||
|
||||
Component {
|
||||
id: share
|
||||
GenericShareDialog {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,9 @@ Pane {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = share.createObject(root, { 'title': qsTr('Channel node ID'), 'text': channeldetails.pubkey })
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Channel node ID'), text: channeldetails.pubkey }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -258,11 +260,6 @@ Pane {
|
||||
channelid: root.channelid
|
||||
}
|
||||
|
||||
Component {
|
||||
id: share
|
||||
GenericShareDialog {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: closechannel
|
||||
CloseChannelDialog {}
|
||||
|
||||
@@ -168,7 +168,9 @@ Pane {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = share.createObject(root, { 'title': qsTr('Payment hash'), 'text': lnpaymentdetails.payment_hash })
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Payment hash'), text: lnpaymentdetails.payment_hash }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -200,7 +202,9 @@ Pane {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = share.createObject(root, { 'title': qsTr('Preimage'), 'text': lnpaymentdetails.preimage })
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Preimage'), text: lnpaymentdetails.preimage }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -235,7 +239,9 @@ Pane {
|
||||
icon.color: enabled ? 'transparent' : constants.mutedForeground
|
||||
enabled: lnpaymentdetails.invoice != ''
|
||||
onClicked: {
|
||||
var dialog = share.createObject(root, { 'title': qsTr('Lightning Invoice'), 'text': lnpaymentdetails.invoice })
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Lightning Invoice'), text: lnpaymentdetails.invoice }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -253,9 +259,4 @@ Pane {
|
||||
onLabelChanged: root.detailsChanged()
|
||||
}
|
||||
|
||||
Component {
|
||||
id: share
|
||||
GenericShareDialog {}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -261,7 +261,9 @@ Pane {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = share.createObject(root, { 'title': qsTr('Transaction ID'), 'text': root.txid })
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Transaction ID'), text: root.txid }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -314,10 +316,4 @@ Pane {
|
||||
txid: root.txid
|
||||
onLabelChanged: root.detailsChanged()
|
||||
}
|
||||
|
||||
Component {
|
||||
id: share
|
||||
GenericShareDialog {}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -171,9 +171,9 @@ Pane {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = share.createObject(rootItem, {
|
||||
'title': qsTr('Master Public Key'),
|
||||
'text': Daemon.currentWallet.masterPubkey
|
||||
var dialog = app.genericShareDialog.createObject(rootItem, {
|
||||
title: qsTr('Master Public Key'),
|
||||
text: Daemon.currentWallet.masterPubkey
|
||||
})
|
||||
dialog.open()
|
||||
}
|
||||
@@ -356,11 +356,4 @@ Pane {
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: share
|
||||
GenericShareDialog {
|
||||
onClosed: destroy()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user