|
@ -6,9 +6,19 @@ |
|
|
<div class="col-12 col-sm-6 col-md-5 col-lg-4"> |
|
|
<div class="col-12 col-sm-6 col-md-5 col-lg-4"> |
|
|
<q-card class="q-pa-lg"> |
|
|
<q-card class="q-pa-lg"> |
|
|
<q-card-section class="q-pa-none"> |
|
|
<q-card-section class="q-pa-none"> |
|
|
<q-responsive v-if="pr" :ratio="1" class="q-mx-xl q-mb-md"> |
|
|
<h5 class="text-subtitle1 q-my-none">{{ paywall.memo }}</h5> |
|
|
<qrcode v-if="pr" :value="pr" :options="{width: 800}" class="rounded-borders"></qrcode> |
|
|
<strong class="text-purple">Price: <lnbits-fsat :amount="{{ paywall.amount }}"></lnbits-fsat> sat</strong> |
|
|
</q-responsive> |
|
|
<q-separator class="q-my-lg"></q-separator> |
|
|
|
|
|
<div v-if="paymentReq"> |
|
|
|
|
|
<a :href="'lightning:' + paymentReq"> |
|
|
|
|
|
<q-responsive :ratio="1" class="q-mx-xl q-mb-md"> |
|
|
|
|
|
<qrcode :value="paymentReq" :options="{width: 800}" class="rounded-borders"></qrcode> |
|
|
|
|
|
</q-responsive> |
|
|
|
|
|
</a> |
|
|
|
|
|
<div class="row q-mt-lg"> |
|
|
|
|
|
<q-btn outline color="grey" @click="copyText(paymentReq)">Copy invoice</q-btn> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<div v-if="redirectUrl"> |
|
|
<div v-if="redirectUrl"> |
|
|
<p>You can access the URL behind this paywall:<br> |
|
|
<p>You can access the URL behind this paywall:<br> |
|
|
<strong>{% raw %}{{ redirectUrl }}{% endraw %}</strong></p> |
|
|
<strong>{% raw %}{{ redirectUrl }}{% endraw %}</strong></p> |
|
@ -40,7 +50,7 @@ |
|
|
mixins: [windowMixin], |
|
|
mixins: [windowMixin], |
|
|
data: function () { |
|
|
data: function () { |
|
|
return { |
|
|
return { |
|
|
pr: null, |
|
|
paymentReq: null, |
|
|
fingerprint: { |
|
|
fingerprint: { |
|
|
hash: null, |
|
|
hash: null, |
|
|
isValid: false |
|
|
isValid: false |
|
@ -55,7 +65,7 @@ |
|
|
axios.get( |
|
|
axios.get( |
|
|
'/paywall/api/v1/paywalls/{{ paywall.id }}/invoice' |
|
|
'/paywall/api/v1/paywalls/{{ paywall.id }}/invoice' |
|
|
).then(function (response) { |
|
|
).then(function (response) { |
|
|
self.pr = response.data.payment_request; |
|
|
self.paymentReq = response.data.payment_request; |
|
|
|
|
|
|
|
|
dismissMsg = self.$q.notify({ |
|
|
dismissMsg = self.$q.notify({ |
|
|
timeout: 0, |
|
|
timeout: 0, |
|
@ -79,8 +89,12 @@ |
|
|
icon: null |
|
|
icon: null |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(function (error) { |
|
|
|
|
|
LNbits.utils.notifyApiError(error); |
|
|
}); |
|
|
}); |
|
|
}, 2000); |
|
|
}, 2000); |
|
|
|
|
|
}).catch(function (error) { |
|
|
|
|
|
LNbits.utils.notifyApiError(error); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|