btcpayserver/BTCPayServer/Views/Server/RPCService.cshtml
Wouter Samaey f1a222fbb3
New unit test to scan for external links/forms and if they have rel="noreferrer noopener" (#2668)
* Unit test to check for (possibly) external links

* Add rel="noreferrer noopener" to all external links so unit test passes

* Update BTCPayServer.Tests/UnitTest1.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer.Tests/UnitTest1.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Fixed bad merge from master

* PascalCasing

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-06 10:35:42 +02:00

91 lines
3.5 KiB
Plaintext

@model LightningWalletServices
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, Model.WalletName);
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
@if (Model.ShowQR)
{
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<vc:icon symbol="close" />
</button>
<div>
<span><b>CONFIDENTIAL:</b> This QR Code is confidential, close this window as soon as you don't need it anymore.<br /></span>
<span>A malicious actor with access to this QR Code can <b>affect the performances of your server</b> and <b>might steal your funds</b>.</span>
</div>
</div>
}
<div class="row">
<div class="col-md-8">
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="text-danger"></div>
}
<h4 class="mb-3">Full node connection</h4>
<p>This page exposes information to connect remotely to your full node via the RPC protocol.</p>
<h4 class="mb-3">Compatible wallets</h4>
<div>
<a href="https://apps.apple.com/us/app/fully-noded/id1436425586" target="_blank" class="d-inline-block me-3 text-center" rel="noreferrer noopener">
<img src="~/img/fullynoded.png" width="100" height="100" asp-append-version="true" alt="Fully Noded" />
<div class="mt-2">Fully Noded</div>
</a>
<a href="https://github.com/cryptoadvance/specter-desktop" target="_blank" class="d-inline-block me-3 text-center" rel="noreferrer noopener">
<img src="~/img/specter.png" width="100" height="100" asp-append-version="true" alt="Specter Desktop" />
<div class="mt-2">Specter Desktop</div>
</a>
</div>
<h4 class="mt-5 mb-3">QR Code connection</h4>
<p>You can use QR Code to connect to @Model.WalletName with compatible wallets.</p>
<div class="form-group">
@if (!Model.ShowQR)
{
<div class="form-group">
<form method="get">
<input type="hidden" asp-for="ShowQR" value="true"/>
<button type="submit" class="btn btn-primary">Show Confidential QR Code</button>
</form>
</div>
}
else
{
<div class="form-group">
<div id="qrCode"></div>
<div id="qrCodeData" data-url="@Model.ServiceLink"></div>
</div>
<p>See QR Code information by clicking <a href="#detailsQR" data-bs-toggle="collapse">here</a></p>
<div id="detailsQR" class="collapse">
<div class="form-group">
<label class="form-label">QR Code data</label>
<input asp-for="ServiceLink" readonly class="form-control"/>
</div>
</div>
}
</div>
</div>
</div>
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
@if (Model.ShowQR)
{
<script src="~/js/qrcode.js" asp-append-version="true"></script>
<script>
new QRCode(document.getElementById("qrCode"), {
text: @Safe.Json(Model.ServiceLink),
width: 200,
height: 200,
useSVG: true,
correctLevel : QRCode.CorrectLevel.M
});
</script>
}
}