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-03-19 21:43:38 +01:00
<div v-if="model.invoiceBitcoinUrlQR" class="qr-container" :data-qr-value="model.invoiceBitcoinUrlQR" :data-clipboard="model.btcAddress">
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
</div>
2023-01-12 02:41:33 +01:00
<div v-if="model.btcAddress" class="input-group mt-3">
2023-05-05 10:00:55 +02:00
<div class="form-floating" id="Lightning_@Model.PaymentMethodId">
<vc:truncate-center text="model.btcAddress" is-vue="true" padding="15" elastic="true" classes="form-control-plaintext" />
<label v-t="'lightning'"></label>
2023-01-12 02:41:33 +01:00
</div>
</div>
2023-08-31 02:44:10 +02:00
<a v-if="model.invoiceBitcoinUrl && model.showPayInWalletButton" class="btn btn-primary rounded-pill w-100 mt-4" id="PayInWallet" target="_blank"
2022-11-24 00:53:32 +01:00
:href="model.invoiceBitcoinUrl" v-t="'pay_in_wallet'"></a>
2023-05-08 12:09:48 +02:00
<div v-if="!model.invoiceBitcoinUrl && !model.btcAddress" class="alert alert-danger">This payment method is not available when using an insecure connection. Please use HTTPS or Tor.</div>
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', {
2023-11-30 10:17:23 +01:00
props: ['model', 'nfcSupported', 'nfcScanning', 'nfcErrorMessage'],
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>