|
|
@ -23,10 +23,20 @@ ElDialog { |
|
|
|
color: "#aa000000" |
|
|
|
} |
|
|
|
|
|
|
|
padding: 0 |
|
|
|
|
|
|
|
property bool valid: comment.text.length <= invoiceParser.lnurlData['comment_allowed'] |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: parent.width |
|
|
|
spacing: 0 |
|
|
|
|
|
|
|
GridLayout { |
|
|
|
columns: 2 |
|
|
|
|
|
|
|
width: parent.width |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.leftMargin: constants.paddingLarge |
|
|
|
Layout.rightMargin: constants.paddingLarge |
|
|
|
|
|
|
|
Label { |
|
|
|
text: qsTr('Provider') |
|
|
@ -66,12 +76,23 @@ ElDialog { |
|
|
|
Layout.minimumHeight: 80 |
|
|
|
wrapMode: TextEdit.Wrap |
|
|
|
placeholderText: qsTr('Enter an (optional) message for the receiver') |
|
|
|
color: text.length > invoiceParser.lnurlData['comment_allowed'] ? constants.colorError : Material.foreground |
|
|
|
} |
|
|
|
|
|
|
|
Button { |
|
|
|
Layout.columnSpan: 2 |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
Label { |
|
|
|
visible: invoiceParser.lnurlData['comment_allowed'] > 0 |
|
|
|
text: qsTr('%1 characters remaining').arg(Math.max(0, (invoiceParser.lnurlData['comment_allowed'] - comment.text.length) )) |
|
|
|
color: constants.mutedForeground |
|
|
|
font.pixelSize: constants.fontSizeSmall |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
FlatButton { |
|
|
|
Layout.topMargin: constants.paddingLarge |
|
|
|
Layout.fillWidth: true |
|
|
|
text: qsTr('Proceed') |
|
|
|
icon.source: '../../icons/confirmed.png' |
|
|
|
enabled: valid |
|
|
|
onClicked: { |
|
|
|
invoiceParser.lnurlGetInvoice(invoiceParser.lnurlData['min_sendable_sat'], comment.text) |
|
|
|
dialog.close() |
|
|
|