mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
7f49824783
* Add store name to LN info unavailable pae * Display multiple node info items if available Allows to view clearnet and Tor connection info side by side. * Re-add preferOnion for certain cases * HTML compatible node ids * Display more node connection failure details * Fix syntax error * Update BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com> * View updates * Revert previous variable change * Keep logic out of the view Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
83 lines
4.6 KiB
Plaintext
83 lines
4.6 KiB
Plaintext
@addTagHelper *, BundlerMinifier.TagHelpers
|
||
@inject ISettingsRepository _settingsRepository
|
||
|
||
@using BTCPayServer.Abstractions.Contracts
|
||
@using BTCPayServer.Lightning
|
||
@model BTCPayServer.Controllers.ShowLightningNodeInfoViewModel
|
||
@{
|
||
Layout = null;
|
||
var theme = await _settingsRepository.GetTheme();
|
||
}
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<title>@Model.StoreName – @Model.CryptoCode Lightning Node</title>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||
<link rel="apple-touch-icon" href="~/img/icons/icon-512x512.png" asp-append-version="true">
|
||
<link rel="apple-touch-startup-image" href="~/img/splash.png" asp-append-version="true">
|
||
<link rel="manifest" href="~/manifest.json">
|
||
<bundle name="wwwroot/bundles/main-bundle.min.css" asp-append-version="true" />
|
||
<link href="@Context.Request.GetRelativePathOrAbsolute(theme.CssUri)" rel="stylesheet" asp-append-version="true"/>
|
||
<link href="~/main/qrcode.css" rel="stylesheet" asp-append-version="true" />
|
||
</head>
|
||
<body>
|
||
<div id="app" class="container">
|
||
<div class="row" style="height:100vh">
|
||
<div class="col-md-8 col-sm-12 col-lg-6 mx-auto my-auto">
|
||
<div class="card border-0">
|
||
<div class="card-body p-4">
|
||
<h1 class="card-title text-center">@Model.StoreName</h1>
|
||
<h2 class="card-subtitle text-center text-secondary my-3">
|
||
<span>@Model.CryptoCode</span>
|
||
Lightning Node
|
||
</h2>
|
||
<h3 class="card-title text-center">
|
||
<span>
|
||
@(Model.Available ? "Online" : "Unavailable")
|
||
</span>
|
||
<small class="text-@(Model.Available ? "success" : "danger")" >
|
||
<span class="fa fa-circle"></span>
|
||
</small>
|
||
</h3>
|
||
@if (Model.Available)
|
||
{
|
||
@if (Model.NodeInfo.Length > 1)
|
||
{
|
||
<ul class="nav nav-pills justify-content-center mt-4" id="nodeInfo-tab" role="tablist">
|
||
@for (int i = 0; i < Model.NodeInfo.Length; i++)
|
||
{
|
||
var nodeInfo = Model.NodeInfo[i];
|
||
<li class="nav-item" role="presentation">
|
||
<button class="nav-link w-100px @(i == 0 ? "active" : "")" id="nodeInfo-tab-@nodeInfo.Id" data-bs-toggle="pill" data-bs-target="#nodeInfo-@nodeInfo.Id" type="button" role="tab" aria-controls="nodeInfo-@nodeInfo.Id" aria-selected="true">@(Model.NodeInfo[i].IsTor ? "Tor" : "Clearnet")</button>
|
||
</li>
|
||
}
|
||
</ul>
|
||
}
|
||
<div class="tab-content" id="nodeInfo-tabContent">
|
||
@for (int i = 0; i < Model.NodeInfo.Length; i++)
|
||
{
|
||
var nodeInfo = Model.NodeInfo[i];
|
||
<div class="tab-pane fade @(i == 0 ? "show active" : "")" id="nodeInfo-@nodeInfo.Id" role="tabpanel" aria-labelledby="nodeInfo-tab-@nodeInfo.Id">
|
||
<div class="qr-container my-3">
|
||
<img alt="@Model.CryptoCode" class="qr-icon" src="@Model.CryptoImage"/>
|
||
<vc:qr-code data="@nodeInfo.ToString()"/>
|
||
</div>
|
||
<div class="input-group" data-clipboard="@nodeInfo.ToString()">
|
||
<input type="text" class="form-control" style="cursor:copy" readonly="readonly" value="@nodeInfo.ToString()" id="nodeInfo-addr-@nodeInfo.Id"/>
|
||
<button type="button" class="btn btn-outline-secondary" data-clipboard-confirm>Copy</button>
|
||
</div>
|
||
</div>
|
||
}
|
||
</div>
|
||
}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<partial name="LayoutFoot" />
|
||
</body>
|
||
</html>
|