2022-11-02 10:21:33 +01:00
|
|
|
@model BTCPayServer.Models.InvoicingModels.PaymentModel
|
|
|
|
|
|
|
|
<template id="lightning-method-checkout-template">
|
|
|
|
<div class="payment-box">
|
2023-02-08 07:47:38 +01:00
|
|
|
@await Component.InvokeAsync("UiExtensionPoint" , new { location="checkout-v2-lightning-pre-content", model = Model})
|
2023-02-10 03:23:48 +01:00
|
|
|
<div v-if="model.invoiceBitcoinUrlQR" class="qr-container" :data-qr-value="model.invoiceBitcoinUrlQR" :data-clipboard="model.btcAddress" data-clipboard-confirm-element="QR_Text_@Model.PaymentMethodId">
|
2023-01-12 02:41:33 +01:00
|
|
|
<div>
|
|
|
|
<qrcode :value="model.invoiceBitcoinUrlQR" tag="div" :options="qrOptions" />
|
|
|
|
</div>
|
|
|
|
<img class="qr-icon" :src="model.cryptoImage" :alt="model.paymentMethodName"/>
|
2022-11-24 00:53:32 +01:00
|
|
|
<small class="qr-text" id="QR_Text_@Model.PaymentMethodId" v-t="'qr_text'"></small>
|
|
|
|
</div>
|
2023-01-12 02:41:33 +01:00
|
|
|
<div v-if="model.btcAddress" class="input-group mt-3">
|
|
|
|
<div class="form-floating">
|
2023-02-10 03:23:48 +01:00
|
|
|
<input id="Lightning_@Model.PaymentMethodId" class="form-control-plaintext" readonly="readonly" :value="model.btcAddress">
|
|
|
|
<label for="Lightning_@Model.PaymentMethodId" v-t="'lightning'"></label>
|
2023-01-12 02:41:33 +01:00
|
|
|
</div>
|
2023-02-10 03:23:48 +01:00
|
|
|
<button type="button" class="btn btn-link" data-clipboard-target="#Lightning_@Model.PaymentMethodId" :data-clipboard-confirm="$t('copy_confirm')" v-t="'copy'"></button>
|
2023-01-12 02:41:33 +01:00
|
|
|
</div>
|
2023-02-22 07:53:14 +01:00
|
|
|
<a v-if="model.invoiceBitcoinUrl" class="btn btn-primary rounded-pill w-100 mt-4" target="_top" id="PayInWallet"
|
2022-11-24 00:53:32 +01:00
|
|
|
:href="model.invoiceBitcoinUrl" v-t="'pay_in_wallet'"></a>
|
2023-02-08 07:47:38 +01:00
|
|
|
@await Component.InvokeAsync("UiExtensionPoint", new {location = "checkout-v2-lightning-post-content", model = Model})
|
2022-11-02 10:21:33 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
Vue.component('LightningLikeMethodCheckout', {
|
2022-11-24 00:53:32 +01:00
|
|
|
props: ["model"],
|
2022-11-02 10:21:33 +01:00
|
|
|
template: "#lightning-method-checkout-template",
|
|
|
|
components: {
|
|
|
|
qrcode: VueQrcode
|
2022-11-24 00:53:32 +01:00
|
|
|
},
|
|
|
|
data () {
|
|
|
|
// currentTab is needed for backwards-compatibility with old plugin versions
|
|
|
|
return { currentTab: undefined };
|
2022-11-02 10:21:33 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|