mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 14:40:36 +01:00
* Improve and unify page headers * Altcoin test fixes * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Fix missing store name in pairing view * Fix CanUsePairing test * Bump header navigation font size * Use partial tag instead of Html.PartialAsync in views As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper). * Fix docs link As in #2432. * Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
92 lines
4.6 KiB
Text
92 lines
4.6 KiB
Text
@model WalletPSBTViewModel
|
|
@addTagHelper *, BundlerMinifier.TagHelpers
|
|
@{
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT, string.IsNullOrEmpty(Model.Decoded) ? "Decode PSBT" : "Decoded PSBT", Context.GetStoreData().StoreName);
|
|
}
|
|
|
|
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
|
|
|
|
<div class="row">
|
|
<div class="col-md-10">
|
|
@if (Model.Errors != null && Model.Errors.Count != 0)
|
|
{
|
|
<div class="alert alert-danger alert-dismissible" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
@foreach (var error in Model.Errors)
|
|
{
|
|
<span>@error</span>
|
|
<br/>
|
|
}
|
|
</div>
|
|
}
|
|
@if (!string.IsNullOrEmpty(Model.Decoded))
|
|
{
|
|
<div class="form-group">
|
|
<form method="post" asp-action="WalletPSBT" asp-route-walletId="@this.Context.GetRouteValue("walletId")">
|
|
<input type="hidden" asp-for="CryptoCode"/>
|
|
<input type="hidden" asp-for="NBXSeedAvailable"/>
|
|
<input type="hidden" asp-for="PSBT"/>
|
|
<input type="hidden" asp-for="FileName"/>
|
|
<div class="d-flex">
|
|
<partial name="WalletSigningMenu" model="@((Model.CryptoCode, Model.NBXSeedAvailable))"/>
|
|
<div class="ml-2 dropdown">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="OtherActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Other actions...
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="OtherActions">
|
|
<button name="command" type="submit" class="dropdown-item" value="broadcast">Review</button>
|
|
<button name="command" type="submit" class="dropdown-item" value="update">Update</button>
|
|
<button name="command" type="submit" class="dropdown-item" value="combine">Combine</button>
|
|
<button name="command" type="submit" class="dropdown-item" value="save-psbt">Download</button>
|
|
<button name="command" type="button" class="dropdown-item only-for-js" data-toggle="modal" data-target="#scan-qr-modal">Show QR</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<pre><code class="json">@Model.Decoded</code></pre>
|
|
}
|
|
<p>You can decode a PSBT by either pasting its content or by uploading the file.</p>
|
|
<form class="form-group" method="post" asp-action="WalletPSBT" asp-route-walletId="@this.Context.GetRouteValue("walletId")" enctype="multipart/form-data">
|
|
<div class="form-group">
|
|
<label asp-for="PSBT"></label>
|
|
<textarea class="form-control" rows="5" asp-for="PSBT"></textarea>
|
|
<span asp-validation-for="PSBT" class="text-danger"></span>
|
|
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="UploadedPSBTFile"></label>
|
|
<input type="file" class="form-control-file" asp-for="UploadedPSBTFile">
|
|
</div>
|
|
|
|
<button type="button" id="scanqrcode" class="ml-2 btn btn-secondary only-for-js" data-toggle="modal" data-target="#scanModal" title="Scan with camera">
|
|
<i class="fa fa-camera"></i>
|
|
</button>
|
|
<button type="submit" name="command" value="decode" class="btn btn-primary" id="Decode">Decode</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<partial name="ShowQR"/>
|
|
<partial name="CameraScanner"/>
|
|
|
|
|
|
@section Scripts {
|
|
<link rel="stylesheet" href="~/vendor/highlightjs/default.min.css" asp-append-version="true">
|
|
<script src="~/vendor/highlightjs/highlight.min.js" asp-append-version="true"></script>
|
|
<bundle name="wwwroot/bundles/camera-bundle.min.js"></bundle>
|
|
<link href="~/vendor/vue-qrcode-reader/vue-qrcode-reader.css" rel="stylesheet" asp-append-version="true"/>
|
|
<script>
|
|
hljs.initHighlightingOnLoad();
|
|
|
|
$(function (){
|
|
initQRShow("Scan PSBT", @Json.Serialize(Model.PSBTHex), "scan-qr-modal");
|
|
initCameraScanningApp("Scan PSBT", function (data){
|
|
$("textarea[name=PSBT]").val(data);
|
|
$("#Decode").click();
|
|
}, "scanModal");
|
|
});
|
|
</script>
|
|
}
|