Skip to content

Commit 1314d54

Browse files
remove nfc and pay in wallet buttons (#61)
1 parent 57fead8 commit 1314d54

File tree

1 file changed

+24
-29
lines changed

1 file changed

+24
-29
lines changed

templates/tpos/tpos.html

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -420,29 +420,34 @@ <h5 class="q-mt-none q-mb-sm">${totalfsat}<small> sat</small></h5>
420420
v-if="invoiceDialog.data"
421421
class="q-pa-lg q-pt-xl lnbits__dialog-card"
422422
>
423-
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
424-
<lnbits-qrcode
425-
:value="'lightning:' + invoiceDialog.data.payment_request.toUpperCase()"
426-
:options="{width: 800}"
427-
class="rounded-borders"
428-
></lnbits-qrcode>
429-
</q-responsive>
423+
<a
424+
:href="'lightning:' + invoiceDialog.data.payment_request.toUpperCase()"
425+
target="_blank"
426+
rel="noopener noreferrer"
427+
>
428+
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
429+
<lnbits-qrcode
430+
:value="'lightning:' + invoiceDialog.data.payment_request.toUpperCase()"
431+
:options="{width: 800}"
432+
class="rounded-borders"
433+
></lnbits-qrcode>
434+
</q-responsive>
435+
<q-tooltip>Pay in wallet</q-tooltip>
436+
</a>
430437
<div class="text-center">
431438
<h3 class="q-my-md">${ amountWithTipFormatted }</h3>
432-
<h5 class="q-mt-none">
439+
<h5 class="q-mt-none q-mb-sm">
433440
${ fsat }
434441
<small> sat</small>
435442
<span v-show="tip_options" style="font-size: 0.75rem"
436443
>( + ${ tipAmountFormatted } tip)</span
437444
>
438445
</h5>
439-
<q-btn
440-
outline
441-
color="grey"
442-
icon="nfc"
443-
@click="readNfcTag()"
444-
:disable="nfcTagReading"
445-
></q-btn>
446+
<q-chip v-if="nfcTagReading" square>
447+
<q-avatar icon="nfc" color="positive" text-color="white"></q-avatar>
448+
NFC supported
449+
</q-chip>
450+
<span v-else class="text-caption text-grey">NFC not supported</span>
446451
</div>
447452
<div class="row q-mt-lg">
448453
<q-btn
@@ -451,14 +456,6 @@ <h5 class="q-mt-none">
451456
@click="copyText(invoiceDialog.data.payment_request)"
452457
>Copy invoice</q-btn
453458
>
454-
<q-btn
455-
outline
456-
color="grey"
457-
class="q-ml-md"
458-
type="a"
459-
:href="'lightning:'+invoiceDialog.data.payment_request"
460-
>Pay in wallet</q-btn
461-
>
462459
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Close</q-btn>
463460
</div>
464461
</q-card>
@@ -753,7 +750,7 @@ <h5 class="q-mt-none">
753750
rowsPerPage: 10
754751
}
755752
},
756-
monochrome: this.$q.localStorage.getItem('lnbits.tpos.color'),
753+
monochrome: this.$q.localStorage.getItem('lnbits.tpos.color') || false,
757754
showPoS: true,
758755
cartDrawer: this.$q.screen.width > 1200,
759756
searchTerm: '',
@@ -1061,6 +1058,7 @@ <h5 class="q-mt-none">
10611058
.then(function (response) {
10621059
dialog.data = response.data
10631060
dialog.show = true
1061+
self.readNfcTag()
10641062

10651063
dialog.dismissMsg = self.$q.notify({
10661064
timeout: 0,
@@ -1097,11 +1095,8 @@ <h5 class="q-mt-none">
10971095
const self = this
10981096

10991097
if (typeof NDEFReader == 'undefined') {
1100-
throw {
1101-
toString: function () {
1102-
return 'NFC not supported on this device or browser.'
1103-
}
1104-
}
1098+
console.debug('NFC not supported on this device or browser.')
1099+
return
11051100
}
11061101

11071102
const ndef = new NDEFReader()

0 commit comments

Comments
 (0)