qml InvoiceDialog: show invoice type in the title, fallback address in the details
This commit is contained in:
@@ -16,7 +16,7 @@ ElDialog {
|
||||
signal doPay
|
||||
signal invoiceAmountChanged
|
||||
|
||||
title: qsTr('Invoice')
|
||||
title: invoice.invoiceType == Invoice.OnchainInvoice ? qsTr('On-chain Invoice') : qsTr('Lightning Invoice')
|
||||
iconSource: Qt.resolvedUrl('../../icons/tab_send.png')
|
||||
|
||||
padding: 0
|
||||
@@ -66,33 +66,6 @@ ElDialog {
|
||||
: InfoTextArea.IconStyle.Info
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Type')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Image {
|
||||
Layout.preferredWidth: constants.iconSizeSmall
|
||||
Layout.preferredHeight: constants.iconSizeSmall
|
||||
source: invoice.invoiceType == Invoice.LightningInvoice
|
||||
? "../../icons/lightning.png"
|
||||
: "../../icons/bitcoin.png"
|
||||
}
|
||||
|
||||
Label {
|
||||
text: invoice.invoiceType == Invoice.OnchainInvoice
|
||||
? qsTr('On chain')
|
||||
: invoice.invoiceType == Invoice.LightningInvoice
|
||||
? invoice.address
|
||||
? qsTr('Lightning with on-chain fallback address')
|
||||
: qsTr('Lightning')
|
||||
: ''
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.topMargin: constants.paddingSmall
|
||||
@@ -104,7 +77,6 @@ ElDialog {
|
||||
TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
visible: invoice.invoiceType == Invoice.OnchainInvoice
|
||||
leftPadding: constants.paddingMedium
|
||||
|
||||
@@ -388,6 +360,27 @@ ElDialog {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.topMargin: constants.paddingSmall
|
||||
visible: invoice.invoiceType == Invoice.LightningInvoice && invoice.address
|
||||
text: qsTr('Fallback address')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
visible: invoice.invoiceType == Invoice.LightningInvoice && invoice.address
|
||||
leftPadding: constants.paddingMedium
|
||||
Label {
|
||||
width: parent.width
|
||||
text: invoice.address
|
||||
font.family: FixedFont
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user