rename ConfirmInvoiceDialog to InvoiceDialog and style buttons like RequestDialog
This commit is contained in:
@@ -19,6 +19,7 @@ Dialog {
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
title: qsTr('Invoice')
|
title: qsTr('Invoice')
|
||||||
|
standardButtons: invoice_key != '' ? Dialog.Close : Dialog.Cancel
|
||||||
|
|
||||||
modal: true
|
modal: true
|
||||||
parent: Overlay.overlay
|
parent: Overlay.overlay
|
||||||
@@ -60,7 +61,6 @@ Dialog {
|
|||||||
text: invoice.message
|
text: invoice.message
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
maximumLineCount: 4
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +98,14 @@ Dialog {
|
|||||||
text: invoice.status_str
|
text: invoice.status_str
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
|
Rectangle {
|
||||||
|
height: 1
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
color: Material.accentColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Item { Layout.preferredHeight: constants.paddingLarge; Layout.preferredWidth: 1 }
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
@@ -107,6 +114,7 @@ Dialog {
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: qsTr('Delete')
|
text: qsTr('Delete')
|
||||||
|
icon.source: '../../icons/delete.png'
|
||||||
visible: invoice_key != ''
|
visible: invoice_key != ''
|
||||||
onClicked: {
|
onClicked: {
|
||||||
invoice.wallet.delete_invoice(invoice_key)
|
invoice.wallet.delete_invoice(invoice_key)
|
||||||
@@ -114,13 +122,10 @@ Dialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
|
||||||
text: qsTr('Cancel')
|
|
||||||
onClicked: dialog.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: qsTr('Save')
|
text: qsTr('Save')
|
||||||
|
icon.source: '../../icons/save.png'
|
||||||
|
visible: invoice_key == ''
|
||||||
enabled: invoice.invoiceType == Invoice.OnchainInvoice
|
enabled: invoice.invoiceType == Invoice.OnchainInvoice
|
||||||
onClicked: {
|
onClicked: {
|
||||||
invoice.save_invoice()
|
invoice.save_invoice()
|
||||||
@@ -130,6 +135,7 @@ Dialog {
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: qsTr('Pay now')
|
text: qsTr('Pay now')
|
||||||
|
icon.source: '../../icons/confirmed.png'
|
||||||
enabled: invoice.invoiceType != Invoice.Invalid // TODO && has funds
|
enabled: invoice.invoiceType != Invoice.Invalid // TODO && has funds
|
||||||
onClicked: {
|
onClicked: {
|
||||||
invoice.save_invoice()
|
invoice.save_invoice()
|
||||||
@@ -141,6 +147,8 @@ Dialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
@@ -15,7 +15,7 @@ Dialog {
|
|||||||
|
|
||||||
parent: Overlay.overlay
|
parent: Overlay.overlay
|
||||||
modal: true
|
modal: true
|
||||||
standardButtons: Dialog.Ok
|
standardButtons: Dialog.Close
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ Pane {
|
|||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: confirmInvoiceDialog
|
id: confirmInvoiceDialog
|
||||||
ConfirmInvoiceDialog {
|
InvoiceDialog {
|
||||||
onDoPay: {
|
onDoPay: {
|
||||||
if (invoice.invoiceType == Invoice.OnchainInvoice) {
|
if (invoice.invoiceType == Invoice.OnchainInvoice) {
|
||||||
var dialog = confirmPaymentDialog.createObject(rootItem, {
|
var dialog = confirmPaymentDialog.createObject(rootItem, {
|
||||||
|
|||||||
Reference in New Issue
Block a user