btcpayserver/BTCPayServer/Views/UIServer/P2PService.cshtml
2024-07-25 22:46:02 +09:00

98 lines
3.3 KiB
Plaintext

@model LightningWalletServices
@{
ViewData.SetActivePage(ServerNavPages.Services, Model.WalletName);
}
<div class="sticky-header">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a asp-action="Services">Services</a>
</li>
<li class="breadcrumb-item active" aria-current="page">@ViewData["Title"]</li>
</ol>
<h2 text-translate="true">@ViewData["Title"]</h2>
</nav>
</div>
<partial name="_StatusMessage" />
@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 affect the performances of your server.</span>
</div>
</div>
}
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All"></div>
}
<h4 class="mb-3">Full node connection</h4>
<p>This page exposes information to connect remotely to your full node via the P2P protocol.</p>
<h4 class="mb-3">Compatible wallets</h4>
<div class="services-list">
<a href="https://play.google.com/store/apps/details?id=com.greenaddress.greenbits_android_wallet" target="_blank" class="service" rel="noreferrer noopener">
<img src="~/img/GreenWallet.png" asp-append-version="true" alt="Blockstream Green" />
<h6>Blockstream Green</h6>
</a>
<a href="https://www.wasabiwallet.io/" target="_blank" class="service" rel="noreferrer noopener">
<img src="~/img/wasabi.png" asp-append-version="true" alt="Wasabi Wallet" />
<h6>Wasabi Wallet</h6>
</a>
</div>
<h4 class="mt-4 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 asp-for="ServiceLink" class="form-label">QR Code data</label>
<input asp-for="ServiceLink" class="form-control" readonly />
</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>
}
}