btcpayserver/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml
2023-03-19 21:43:38 +01:00

77 lines
4.3 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.

@inject BTCPayServer.Services.BTCPayServerEnvironment Env
@model BTCPayServer.Controllers.ShowLightningNodeInfoViewModel
@{
Layout = null;
ViewData["Title"] = $"{Model.StoreName} {Model.CryptoCode} Lightning Node";
}
<!DOCTYPE html>
<html lang="en" @(Env.IsDeveloping ? " data-devenv" : "")>
<head>
<partial name="LayoutHead" />
<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="mx-auto my-auto" style="max-width:360px;">
<div class="card border-0">
<div class="card-body p-4">
<h1 class="h2 card-title text-center mt-3">@Model.StoreName</h1>
<h2 class="h4 card-subtitle text-center text-secondary my-3">
<span>@Model.CryptoCode</span>
Lightning Node
</h2>
<h4 class="d-flex align-items-center justify-content-center gap-2">
<span class="btcpay-status btcpay-status--@(Model.Available ? "enabled" : "disabled")" style="margin-top:.1rem;"></span>
<span>
@(Model.Available ? "Online" : "Unavailable")
</span>
</h4>
@if (Model.Available)
{
@if (Model.NodeInfo.Any())
{
@if (Model.NodeInfo.Length > 1)
{
<ul class="nav nav-pills justify-content-center mt-4" id="nodeInfo-tab" role="tablist">
@for (var 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-@i" data-bs-toggle="pill" data-bs-target="#nodeInfo-@i" type="button" role="tab" aria-controls="nodeInfo-@i" aria-selected="true">@(nodeInfo.IsTor ? "Tor" : "Clearnet")</button>
</li>
}
</ul>
}
<div class="tab-content" id="nodeInfo-tabContent">
@for (var i = 0; i < Model.NodeInfo.Length; i++)
{
var nodeInfo = Model.NodeInfo[i].ToString();
<div class="tab-pane fade @(i == 0 ? "show active" : "")" id="nodeInfo-@i" role="tabpanel" aria-labelledby="nodeInfo-tab-@i">
<div class="qr-container my-4 w-100">
<img alt="@Model.CryptoCode" class="qr-icon" src="@Model.CryptoImage"/>
<vc:qr-code data="@nodeInfo"/>
</div>
<div class="input-group" data-clipboard="@nodeInfo">
<input type="text" class="form-control" readonly="readonly" value="@nodeInfo" id="nodeInfo-addr-@i"/>
<button type="button" class="btn btn-outline-secondary px-3">
<vc:icon symbol="copy" />
</button>
</div>
</div>
}
</div>
}
else
{
<p class="text-center mt-4">No public address available.</p>
}
}
</div>
</div>
</div>
</div>
</div>
<partial name="LayoutFoot" />
</body>
</html>