1
0

qml: restore Save button in InvoiceDialog, restore invoice list view, now from menu

This commit is contained in:
Sander van Grieken
2022-10-04 16:33:22 +02:00
parent 6dab3de1f2
commit de83a10c20
3 changed files with 30 additions and 13 deletions

View File

@@ -30,13 +30,6 @@ ElDialog {
height: parent.height
columns: 2
Rectangle {
height: 1
Layout.fillWidth: true
Layout.columnSpan: 2
color: Material.accentColor
}
Label {
text: qsTr('Amount to send')
color: Material.accentColor
@@ -290,7 +283,7 @@ ElDialog {
Layout.alignment: Qt.AlignHCenter
spacing: constants.paddingMedium
Button {
FlatButton {
text: qsTr('Delete')
icon.source: '../../icons/delete.png'
visible: invoice_key != ''
@@ -300,6 +293,17 @@ ElDialog {
}
}
FlatButton {
text: qsTr('Save')
icon.source: '../../icons/save.png'
visible: invoice_key == ''
enabled: invoice.canSave
onClicked: {
invoice.save_invoice()
dialog.close()
}
}
FlatButton {
text: qsTr('Pay')
icon.source: '../../icons/confirmed.png'
@@ -309,11 +313,6 @@ ElDialog {
invoice.save_invoice()
dialog.close()
doPay() // only signal here
// if (invoice.invoiceType == Invoice.OnchainInvoice) {
// doPay() // only signal here
// } else if (invoice.invoiceType == Invoice.LightningInvoice) {
// doPay() // only signal here
// }
}
}
}