mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Rendering of Conversion tab on Invoice if enabled in store settings
This commit is contained in:
@@ -229,6 +229,7 @@ namespace BTCPayServer.Controllers
|
|||||||
Status = invoice.Status,
|
Status = invoice.Status,
|
||||||
CryptoImage = "/" + GetImage(paymentMethodId, network),
|
CryptoImage = "/" + GetImage(paymentMethodId, network),
|
||||||
NetworkFeeDescription = $"{accounting.TxRequired} transaction{(accounting.TxRequired > 1 ? "s" : "")} x {paymentMethodDetails.GetTxFee()} {network.CryptoCode}",
|
NetworkFeeDescription = $"{accounting.TxRequired} transaction{(accounting.TxRequired > 1 ? "s" : "")} x {paymentMethodDetails.GetTxFee()} {network.CryptoCode}",
|
||||||
|
AllowCoinConversion = store.GetStoreBlob().AllowCoinConversion,
|
||||||
AvailableCryptos = invoice.GetPaymentMethods(_NetworkProvider)
|
AvailableCryptos = invoice.GetPaymentMethods(_NetworkProvider)
|
||||||
.Where(i => i.Network != null)
|
.Where(i => i.Network != null)
|
||||||
.Select(kv=> new PaymentModel.AvailableCrypto()
|
.Select(kv=> new PaymentModel.AvailableCrypto()
|
||||||
|
|||||||
@@ -43,5 +43,7 @@ namespace BTCPayServer.Models.InvoicingModels
|
|||||||
public int MaxTimeMinutes { get; internal set; }
|
public int MaxTimeMinutes { get; internal set; }
|
||||||
public string PaymentType { get; internal set; }
|
public string PaymentType { get; internal set; }
|
||||||
public string PaymentMethodId { get; internal set; }
|
public string PaymentMethodId { get; internal set; }
|
||||||
|
|
||||||
|
public bool AllowCoinConversion { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,10 +170,17 @@
|
|||||||
<div class="payment-tabs__tab" id="copy-tab">
|
<div class="payment-tabs__tab" id="copy-tab">
|
||||||
<span i18n="">Copy</span>
|
<span i18n="">Copy</span>
|
||||||
</div>
|
</div>
|
||||||
|
@if (Model.AllowCoinConversion)
|
||||||
|
{
|
||||||
<div class="payment-tabs__tab" id="altcoins-tab">
|
<div class="payment-tabs__tab" id="altcoins-tab">
|
||||||
<span i18n="">Conversion</span>
|
<span i18n="">Conversion</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="tabsSlider" class="payment-tabs__slider three-tabs"></div>
|
<div id="tabsSlider" class="payment-tabs__slider three-tabs"></div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div id="tabsSlider" class="payment-tabs__slider"></div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div adjust-height="" class="payment-box">
|
<div adjust-height="" class="payment-box">
|
||||||
@@ -262,6 +269,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@if (Model.AllowCoinConversion)
|
||||||
|
{
|
||||||
<div id="altcoins" class="bp-view payment manual-flow">
|
<div id="altcoins" class="bp-view payment manual-flow">
|
||||||
<div class="manual__step-two__instructions">
|
<div class="manual__step-two__instructions">
|
||||||
<span>
|
<span>
|
||||||
@@ -285,6 +294,7 @@
|
|||||||
</a>*@
|
</a>*@
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
<div class="bp-view" id="link-expired" style="padding-top: 3.6rem;">
|
<div class="bp-view" id="link-expired" style="padding-top: 3.6rem;">
|
||||||
<div class="manual__step-one refund-address-form" novalidate="">
|
<div class="manual__step-one refund-address-form" novalidate="">
|
||||||
<div class="manual__step-one__header" i18n="">Link Expired</div>
|
<div class="manual__step-one__header" i18n="">Link Expired</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user