btcpayserver/BTCPayServer/Views/UIServer/CLightningRestServices.cshtml
dstrukt c62018f984
1.4.0 Final Polish (#3335)
* adds pay button icon

adds more

update icons

* reduces update app titles

* capitalize PP

* more icons

notification icon update

adds more

* Truncate long titles in nav

* Adjust "off" color state for the wallet/lightning

* Theme switch alignment

* Update store selector

* adds more space in store selector span

* Prevent form zoom on mobile Safari

* updates lightning + settings view

* updates store icon

* adjusts notification icon

* removes notifications setting button icon

* Update status colors

* Fix Lightning nav markup

* Prevent icons from shrinking

* Move main menu styles to css

* Remove max-width container for content area

* Update headlines

* Use fixed header on mobile

* Extract custom pills component

* Form field update

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-25 11:07:52 +09:00

143 lines
5 KiB
Text

@model LndServicesViewModel
@{
ViewData.SetActivePage(ServerNavPages.Services, $"C-Lightning {Model.ConnectionType}");
}
<h2 class="mt-1 mb-4">@ViewData["Title"]</h2>
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="text-danger"></div>
}
<div class="form-group">
<p>
<span>BTCPay exposes Clightning-Rest's service for outside consumption, you will find connection information here.<br /></span>
</p>
</div>
<h5 class="mb-3">Compatible wallets</h5>
<div class="services-list">
<a href="https://github.com/ZeusLN/zeus" target="_blank" class="service" rel="noreferrer noopener">
<img src="~/img/zeus.jpg" asp-append-version="true" alt="Zeus" />
<h6>Zeus</h6>
</a>
</div>
<h4 class="mt-4 mb-3">QR Code connection</h4>
<p>
<span>You can use this QR Code to connect external software to your C-Lightning instance.<br /></span>
<span>This QR Code is only valid for 10 minutes</span>
</p>
<div class="form-group">
@if (Model.QRCode == null)
{
<div class="form-group">
<form method="post">
<button type="submit" class="btn btn-primary mt-2">Show QR Code</button>
</form>
</div>
}
else
{
<div class="form-group">
<div id="qrCode"></div>
<div id="qrCodeData" data-url="@Model.QRCode"></div>
</div>
<p>See QR Code information by clicking <a href="#detailsQR" data-bs-toggle="collapse">here</a></p>
<div id="detailsQR" class="collapse"><h4 class="mt-4 mb-3">QR Code connection</h4>
<div class="form-group">
<label class="form-label">QR Code data</label>
<input asp-for="QRCode" readonly class="form-control" />
</div>
<div class="form-group">
Click <a href="@Model.QRCodeLink" target="_blank" rel="noreferrer noopener">here</a> to open the configuration file.
</div>
</div>
}
<div class="form-group">
<h5>More details...</h5>
<p>Alternatively, you can see the settings by clicking <a href="#details" data-bs-toggle="collapse">here</a></p>
</div>
<div id="details" class="collapse">
@if (Model.Uri == null)
{
<div class="form-group">
<label asp-for="Host" class="form-label"></label>
<input asp-for="Host" readonly class="form-control" />
</div>
<div class="form-group">
<label asp-for="SSL" class="form-label"></label>
<input asp-for="SSL" disabled type="checkbox" class="btcpay-toggle ms-2" />
</div>
}
else
{
<div class="form-group">
<label asp-for="Uri" class="form-label"></label>
<input asp-for="Uri" readonly class="form-control" />
</div>
}
@if (Model.Macaroon != null)
{
<div class="form-group">
<label asp-for="Macaroon" class="form-label"></label>
<input asp-for="Macaroon" readonly class="form-control" />
</div>
}
@if (Model.AdminMacaroon != null)
{
<div class="form-group">
<label asp-for="AdminMacaroon" class="form-label"></label>
<input asp-for="AdminMacaroon" readonly class="form-control" />
</div>
}
@if (Model.InvoiceMacaroon != null)
{
<div class="form-group">
<label asp-for="InvoiceMacaroon" class="form-label"></label>
<input asp-for="InvoiceMacaroon" readonly class="form-control" />
</div>
}
@if (Model.ReadonlyMacaroon != null)
{
<div class="form-group">
<label asp-for="ReadonlyMacaroon" class="form-label"></label>
<input asp-for="ReadonlyMacaroon" readonly class="form-control" />
</div>
}
@if (Model.GRPCSSLCipherSuites != null)
{
<div class="form-group">
<label asp-for="GRPCSSLCipherSuites" class="form-label"></label>
<input asp-for="GRPCSSLCipherSuites" readonly class="form-control" />
</div>
}
@if (Model.CertificateThumbprint != null)
{
<div class="form-group">
<label asp-for="CertificateThumbprint" class="form-label"></label>
<input asp-for="CertificateThumbprint" readonly class="form-control" />
</div>
}
</div>
</div>
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
@if (Model.QRCode != null)
{
<script src="~/js/qrcode.js" asp-append-version="true"></script>
<script>
new QRCode(document.getElementById("qrCode"), {
text: @Safe.Json(Model.QRCode),
width: 200,
height: 200,
useSVG: true,
correctLevel : QRCode.CorrectLevel.M
});
</script>
}
}