Add payment link in checkout with payjoin indicator (#1449)

* Add payment link in checkout with payjoin indicator

* move to bottom
This commit is contained in:
Andrew Camilleri
2020-04-09 13:44:08 +02:00
committed by GitHub
parent 1c0d713b00
commit ed0e423aa7
3 changed files with 18 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
@using BTCPayServer.Services
@model BTCPayServer.Models.InvoicingModels.PaymentModel
<script type="text/x-template" id="bitcoin-lightning-method-checkout-template">
@@ -64,13 +65,22 @@
</div>
</div>
<div class="separatorGem"></div>
<div class="copySectionBox">
<div class="copySectionBox bottomBorder">
<label>{{$t("Address")}}</label>
<div class="inputWithIcon _copyInput">
<input type="text" class="checkoutTextbox" v-bind:value="srvModel.btcAddress" readonly="readonly"/>
<img v-bind:src="srvModel.cryptoImage"/>
</div>
</div>
<div class="separatorGem"></div>
<div class="copySectionBox" :title="$t(hasPayjoin? 'BIP21 payment link' : 'BIP21 payment link with payjoin support') " >
<label>{{$t("Payment link")}}</label>
<div class="inputWithIcon _copyInput">
<input type="text" class="checkoutTextbox" v-bind:value="srvModel.invoiceBitcoinUrl" readonly="readonly"/>
<img v-bind:src="srvModel.cryptoImage" v-if="hasPayjoin"/>
<i class="fa fa-user-secret" v-else/>
</div>
</div>
</nav>
</div>
@if (Model.ChangellyEnabled || Model.CoinSwitchEnabled)
@@ -217,6 +227,9 @@
}
},
computed: {
hasPayjoin: function(){
return this.srvModel.invoiceBitcoinUrl.indexOf('@PayjoinClient.BIP21EndpointKey') === -1;
},
coinswitchAmountDue: function() {
return this.srvModel.coinSwitchAmountMarkupPercentage
? this.srvModel.btcDue * (1 + (this.srvModel.coinSwitchAmountMarkupPercentage / 100))

View File

@@ -11448,7 +11448,7 @@ low-fee-timeline {
position: relative;
}
.inputWithIcon img {
.inputWithIcon img, .inputWithIcon i {
position: absolute;
left: 2px;
top: 9px;
@@ -11458,7 +11458,7 @@ low-fee-timeline {
border-right: 1px solid #e0e0e0;
}
.inputWithIcon.inputIconBg img {
.inputWithIcon.inputIconBg img, .inputWithIcon.inputIconBg i {
background-color: #aaa;
color: #fff;
padding: 9px 4px;

View File

@@ -11447,7 +11447,7 @@ low-fee-timeline {
position: relative;
}
.inputWithIcon img {
.inputWithIcon img, .inputWithIcon i {
position: absolute;
left: 2px;
top: 9px;
@@ -11457,7 +11457,7 @@ low-fee-timeline {
border-right: 1px solid #e0e0e0;
}
.inputWithIcon.inputIconBg img {
.inputWithIcon.inputIconBg img, .inputWithIcon.inputIconBg i {
background-color: #aaa;
color: #fff;
padding: 9px 4px;