mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-11 04:52:34 +02:00
display NFC button on supported and fix null tip options
This commit is contained in:
@@ -175,6 +175,7 @@
|
|||||||
{% endraw %}
|
{% endraw %}
|
||||||
</h5>
|
</h5>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="hasNFC"
|
||||||
outline
|
outline
|
||||||
color="grey"
|
color="grey"
|
||||||
icon="nfc"
|
icon="nfc"
|
||||||
@@ -294,6 +295,7 @@
|
|||||||
exchangeRate: null,
|
exchangeRate: null,
|
||||||
stack: [],
|
stack: [],
|
||||||
tipAmount: 0.0,
|
tipAmount: 0.0,
|
||||||
|
hasNFC: false,
|
||||||
nfcTagReading: false,
|
nfcTagReading: false,
|
||||||
invoiceDialog: {
|
invoiceDialog: {
|
||||||
show: false,
|
show: false,
|
||||||
@@ -370,7 +372,7 @@
|
|||||||
this.showInvoice()
|
this.showInvoice()
|
||||||
},
|
},
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
if (this.tip_options.length) {
|
if (this.tip_options && this.tip_options.length) {
|
||||||
this.showTipModal()
|
this.showTipModal()
|
||||||
} else {
|
} else {
|
||||||
this.showInvoice()
|
this.showInvoice()
|
||||||
@@ -544,6 +546,8 @@
|
|||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
getRates()
|
getRates()
|
||||||
}, 120000)
|
}, 120000)
|
||||||
|
|
||||||
|
this.hasNFC = 'NDEFReader' in window
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user