Browse Source

qml InvoiceDialog: remove delete button, it only makes sense if you visit the list

master
ThomasV 3 years ago
parent
commit
ba82813c06
  1. 14
      electrum/gui/qml/components/InvoiceDialog.qml

14
electrum/gui/qml/components/InvoiceDialog.qml

@ -387,24 +387,12 @@ ElDialog {
ButtonContainer {
Layout.fillWidth: true
FlatButton {
Layout.fillWidth: true
Layout.preferredWidth: 1
text: qsTr('Delete')
icon.source: '../../icons/delete.png'
visible: invoice_key != ''
onClicked: {
invoice.wallet.delete_invoice(invoice_key)
dialog.close()
}
}
FlatButton {
Layout.fillWidth: true
Layout.preferredWidth: 1
text: qsTr('Save')
icon.source: '../../icons/save.png'
visible: invoice_key == ''
enabled: invoice.canSave
enabled: invoice_key == '' && invoice.canSave
onClicked: {
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
if (invoice.amount.isEmpty) {

Loading…
Cancel
Save