btcpayserver/BTCPayServer/Views/Wallets/WalletReceive.cshtml
d11n ed7031981b
Bootstrap v5 migration (#2490)
* Swap bootstrap asset files

* Update themes and color definitions

* Move general bootstrap customizations

* Theme updates

Theme updates

* Remove BuildBundlerMinifier

This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586

* Rewplace btn-block class with w-100

* Update badge classes

* Remove old font family head variable

* Update margin classes

* Cleanups

* Update float classes

* Update text classes

* Update padding classes

* Update border classes

* UPdate dropdown classes

* Update select classes

* Update neutral custom props

* Update bootstrap and customizations

* Update ChromeDriver; disable smooth scroll

https://github.com/SeleniumHQ/selenium/issues/8295

* Improve alert messages

* Improve bootstrap customizations

* Disable reduced motion

See also 7358282f

* Update Bootstrap data attributes

* Update file inputs

* Update input groups

* Replace deprecated jumbotron class

* Update variables; re-add negative margin util classes

* Update cards

* Update form labels

* Debug alerts

* Fix aria-labelledby associations

* Dropdown-related test fixes

* Fix CanUseWebhooks test

* Test fixes

* Nav updates

* Fix nav usage in wallet send and payouts

* Update alert and modal close buttons

* Re-add backdrop properties

* Upgrade Bootstrap to v5 final

* Update screen reader classes

* Update font-weight classes

* Update monospace font classes

* Update accordians

* Update close icon usage

* Cleanup

* Update scripts and style integrations

* Update input group texts

* Update LN node setup page

* Update more form control classes

* Update inline forms

* Add js specific test

* Upgrade Vue.js

* Remove unused JS

* Upgrade Bootstrap to v5.0.1

* Try container related test updates

* Separate jQuery bundle

* Remove jQuery from LND seed backup page

* Remove unused code

* Refactor email autofill js

* Refactor camera scanner JS

* Re-add tests

* Re-add BuildBundlerMinifier

* Do not minify bundles containing Bootstrap

Details https://github.com/madskristensen/BundlerMinifier/issues/558

* Update bundles

* Cleanup JS test

* Cleanup tests involving dropdowns

* Cleanup tests involving collapses

* Cleanup locale additions in ConfigureCore

* Cleanup bundles

* Remove duplicate status message

* Cleanup formatting

* Fix missing validation scripts

* Remove unused unminified Bootstrap js files

* Fix classic theme

* Fix Casa theme

* Fix PoS validation
2021-05-19 11:39:27 +09:00

101 lines
5.7 KiB
Text

@addTagHelper *, BundlerMinifier.TagHelpers
@model BTCPayServer.Controllers.WalletReceiveViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(WalletsNavPages.Receive, $"Receive {Model.CryptoCode}", Context.GetStoreData().StoreName);
}
@section PageHeadContent
{
<link href="~/main/qrcode.css" rel="stylesheet" asp-append-version="true"/>
}
@section PageFootContent
{
<script src="~/js/copy-to-clipboard.js"></script>
<script>
window.onload = function (){
document.querySelectorAll('[data-clipboard]').forEach(value => value.addEventListener('click', window.copyToClipboard));
}
</script>
}
<div class="row no-gutters">
<div class="col-lg-8 mx-auto my-auto">
<form method="post" asp-action="WalletReceive" class="card text-center">
<div class="card-body">
@if (string.IsNullOrEmpty(Model.Address))
{
<h3 class="card-title mb-3">@ViewData["PageTitle"]</h3>
<button id="generateButton" class="btn btn-lg btn-primary" type="submit" name="command" value="generate-new-address">Generate @Model.CryptoCode address</button>
}
else
{
<h3 class="card-title mb-4">Next available @Model.CryptoCode&nbsp;address</h3>
<noscript>
<div class="card-body m-sm-0 p-sm-0">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control " readonly="readonly" asp-for="Address" id="address"/>
<span class="input-group-text fa fa-copy"> </span>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" readonly="readonly" asp-for="PaymentLink" id="payment-link"/>
<span class="input-group-text fa fa-copy"> </span>
</div>
</div>
<div class="row mt-4">
<div class="col-12 col-sm-6">
<button type="submit" name="command" value="generate-new-address" class="btn btn-primary w-100">Generate another address</button>
</div>
<div class="col-12 col-sm-6 mt-4 mt-sm-0">
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-secondary w-100">Unreserve this address</button>
</div>
</div>
</div>
</noscript>
<div class="only-for-js card-body m-sm-0 p-sm-0" id="app">
<div class="mb-4">
<div class="qr-container tab-content mb-3" id="myTabContent">
<img src="@Model.CryptoImage" class="qr-icon" alt="@Model.CryptoCode"/>
<div class="tab-pane show active" id="link-tab" role="tabpanel">
<vc:qr-code data="@Model.PaymentLink"/>
</div>
<div class="tab-pane" id="address-tab" role="tabpanel">
<vc:qr-code data="@Model.Address"/>
</div>
</div>
<div class="nav nav-pills justify-content-center">
<a class="nav-link active" data-bs-toggle="tab" href="#link-tab">Link</a>
<a class="nav-link" data-bs-toggle="tab" href="#address-tab">Address</a>
</div>
</div>
<div class="form-group">
<div class="input-group" data-clipboard="@Model.Address">
<input type="text" class="form-control" style="cursor: copy" readonly="readonly" value="@Model.Address" id="address"/>
<button type="button" class="input-group-text btn btn-outline-secondary" data-clipboard-confirm>Copy address</button>
</div>
</div>
<div class="form-group">
<div class="input-group" data-clipboard="@Model.PaymentLink">
<input type="text" class="form-control" style="cursor: copy" readonly="readonly" value="@Model.PaymentLink" id="payment-link"/>
<button type="button" class="btn btn-outline-secondary" data-clipboard-confirm>Copy link</button>
</div>
</div>
<div class="row mt-4">
<div class="col-12 col-sm-6">
<button type="submit" name="command" value="generate-new-address" class="btn btn-primary w-100">Generate another address</button>
</div>
<div class="col-12 col-sm-6 mt-4 mt-sm-0">
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-secondary w-100">Unreserve this address</button>
</div>
</div>
</div>
}
</div>
</form>
</div>
</div>