mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 18:51:18 +01:00
8420c74b31
Cache static assets for one year and set the correct cache control header. Adds the cache busting version based on file content to asset references to invalidate the cache on change. ([further details on the approach](https://andrewlock.net/adding-cache-control-headers-to-static-files-in-asp-net-core/) and [why one year](https://ashton.codes/set-cache-control-max-age-1-year/)) Most of the changes are the additions of the `asp-append-version="true"` attribute, the main configuration change is in `Startup.cs`.
64 lines
2.7 KiB
Plaintext
64 lines
2.7 KiB
Plaintext
@model BitpayTranslatorViewModel
|
|
|
|
<section>
|
|
<div class="container">
|
|
@if (Model.Address != null)
|
|
{
|
|
<div class="row">
|
|
<div class="col-lg-12 text-center">
|
|
<div class="alert alert-success alert-dismissible" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<p>You need to pay <b>@Model.Amount</b> to <b>@Model.Address</b></p>
|
|
<div id="qrCode"></div>
|
|
<div id="qrCodeData" data-url="@Model.BitcoinUri" style="margin-bottom:20px;"></div>
|
|
<p>
|
|
<a class="btn btn-primary" href="@Model.BitcoinUri">
|
|
<span>Open in wallet</span>
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
<div class="row">
|
|
<div class="col-lg-12 section-heading">
|
|
<h2>The Bitpay Translator</h2>
|
|
<hr class="primary">
|
|
<p>Bitpay is using a deprecated standard in their invoices that most wallets do not support. Use this tool to transform their invoices to a regular address/amount.</p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-4 text-center"> </div>
|
|
<div class="col-lg-4 text-center">
|
|
<form method="post">
|
|
<div class="form-group">
|
|
<label asp-for="BitpayLink" class="control-label"></label>*
|
|
<input asp-for="BitpayLink" class="form-control" />
|
|
<span asp-validation-for="BitpayLink" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="submit" class="btn btn-secondary" title="Continue">Translate to address</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="col-lg-4 text-center"> </div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
@section Scripts {
|
|
@await Html.PartialAsync("_ValidationScriptsPartial")
|
|
<script type="text/javascript" src="~/js/qrcode.js" asp-append-version="true"></script>
|
|
<script type="text/javascript">
|
|
new QRCode(document.getElementById("qrCode"),
|
|
{
|
|
text: @Safe.Json(Model.BitcoinUri),
|
|
width: 200,
|
|
height: 200,
|
|
useSVG: true,
|
|
correctLevel : QRCode.CorrectLevel.M
|
|
});
|
|
$("#qrCode > img").css({ "margin": "auto" });
|
|
</script>
|
|
}
|