From 10a1f11a533761129042e6a5e8ba25227a90c4dc Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 26 Sep 2022 16:11:52 +0200 Subject: [PATCH] re-add copy and share buttons --- electrum/gui/qml/components/ReceiveDialog.qml | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/ReceiveDialog.qml b/electrum/gui/qml/components/ReceiveDialog.qml index 986becaf8..09ef0768e 100644 --- a/electrum/gui/qml/components/ReceiveDialog.qml +++ b/electrum/gui/qml/components/ReceiveDialog.qml @@ -151,9 +151,41 @@ ElDialog { color: Material.accentColor } + RowLayout { + Layout.alignment: Qt.AlignHCenter + Button { + icon.source: '../../icons/copy_bw.png' + icon.color: 'transparent' + text: 'Copy' + onClicked: { + if (request.isLightning && rootLayout.state == 'bolt11') + AppController.textToClipboard(_bolt11) + else if (rootLayout.state == 'bip21uri') + AppController.textToClipboard(_bip21uri) + else + AppController.textToClipboard(_address) + } + } + Button { + icon.source: '../../icons/share.png' + text: 'Share' + onClicked: { + enabled = false + if (request.isLightning && rootLayout.state == 'bolt11') + AppController.doShare(_bolt11, qsTr('Payment Request')) + else if (rootLayout.state == 'bip21uri') + AppController.doShare(_bip21uri, qsTr('Payment Request')) + else + AppController.doShare(_address, qsTr('Onchain address')) + + enabled = true + } + } + } Button { - text: 'specify' + Layout.alignment: Qt.AlignHCenter + text: qsTr('Edit') onClicked: receiveDetailsDialog.open() } }