btcpayserver/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml
2022-03-08 08:17:39 +00:00

81 lines
4.5 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@addTagHelper *, BundlerMinifier.TagHelpers
@inject ISettingsRepository _settingsRepository
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Abstractions.Extensions
@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 mt-3">@Model.StoreName</h1>
<h2 class="h3 card-subtitle text-center text-secondary my-3">
<span>@Model.CryptoCode</span>
Lightning Node
</h2>
<h4 class="text-center">
<span class="me-1 btcpay-status btcpay-status--@(Model.Available ? "enabled" : "disabled")"></span>
<span>
@(Model.Available ? "Online" : "Unavailable")
</span>
</h4>
@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-4 w-100">
<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>