Skip to content

Commit

Permalink
remove nfc and pay in wallet buttons (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
talvasconcelos authored Jan 22, 2024
1 parent 57fead8 commit 1314d54
Showing 1 changed file with 24 additions and 29 deletions.
53 changes: 24 additions & 29 deletions templates/tpos/tpos.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,29 +420,34 @@ <h5 class="q-mt-none q-mb-sm">${totalfsat}<small> sat</small></h5>
v-if="invoiceDialog.data"
class="q-pa-lg q-pt-xl lnbits__dialog-card"
>
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
<lnbits-qrcode
:value="'lightning:' + invoiceDialog.data.payment_request.toUpperCase()"
:options="{width: 800}"
class="rounded-borders"
></lnbits-qrcode>
</q-responsive>
<a
:href="'lightning:' + invoiceDialog.data.payment_request.toUpperCase()"
target="_blank"
rel="noopener noreferrer"
>
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
<lnbits-qrcode
:value="'lightning:' + invoiceDialog.data.payment_request.toUpperCase()"
:options="{width: 800}"
class="rounded-borders"
></lnbits-qrcode>
</q-responsive>
<q-tooltip>Pay in wallet</q-tooltip>
</a>
<div class="text-center">
<h3 class="q-my-md">${ amountWithTipFormatted }</h3>
<h5 class="q-mt-none">
<h5 class="q-mt-none q-mb-sm">
${ fsat }
<small> sat</small>
<span v-show="tip_options" style="font-size: 0.75rem"
>( + ${ tipAmountFormatted } tip)</span
>
</h5>
<q-btn
outline
color="grey"
icon="nfc"
@click="readNfcTag()"
:disable="nfcTagReading"
></q-btn>
<q-chip v-if="nfcTagReading" square>
<q-avatar icon="nfc" color="positive" text-color="white"></q-avatar>
NFC supported
</q-chip>
<span v-else class="text-caption text-grey">NFC not supported</span>
</div>
<div class="row q-mt-lg">
<q-btn
Expand All @@ -451,14 +456,6 @@ <h5 class="q-mt-none">
@click="copyText(invoiceDialog.data.payment_request)"
>Copy invoice</q-btn
>
<q-btn
outline
color="grey"
class="q-ml-md"
type="a"
:href="'lightning:'+invoiceDialog.data.payment_request"
>Pay in wallet</q-btn
>
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Close</q-btn>
</div>
</q-card>
Expand Down Expand Up @@ -753,7 +750,7 @@ <h5 class="q-mt-none">
rowsPerPage: 10
}
},
monochrome: this.$q.localStorage.getItem('lnbits.tpos.color'),
monochrome: this.$q.localStorage.getItem('lnbits.tpos.color') || false,
showPoS: true,
cartDrawer: this.$q.screen.width > 1200,
searchTerm: '',
Expand Down Expand Up @@ -1061,6 +1058,7 @@ <h5 class="q-mt-none">
.then(function (response) {
dialog.data = response.data
dialog.show = true
self.readNfcTag()

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

if (typeof NDEFReader == 'undefined') {
throw {
toString: function () {
return 'NFC not supported on this device or browser.'
}
}
console.debug('NFC not supported on this device or browser.')
return
}

const ndef = new NDEFReader()
Expand Down

0 comments on commit 1314d54

Please sign in to comment.