From ba423a79e3211c60bddb7ee8bb92356f959dd374 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Sat, 29 Oct 2022 15:26:20 +0200 Subject: [PATCH] Fix Public Node Info View As the Node Info was used as an ID, this didn't work with IPv6 addresses, as those contain characters not suitable for HTML IDs. Fixes #4245. Also: Simplify the head section of that view by reusing the existing partial. --- .../ShowLightningNodeInfo.cshtml | 35 ++++++------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml b/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml index fca20ba66..2f98740b8 100644 --- a/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml +++ b/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml @@ -1,27 +1,12 @@ -@using BTCPayServer.Abstractions.Extensions @model BTCPayServer.Controllers.ShowLightningNodeInfoViewModel -@inject BTCPayServer.Services.ThemeSettings Theme @{ Layout = null; + ViewData["Title"] = $"{Model.StoreName} – {Model.CryptoCode} Lightning Node"; } - @Model.StoreName – @Model.CryptoCode Lightning Node - - - - - - - - - - - - - - + @@ -46,26 +31,26 @@ @if (Model.NodeInfo.Length > 1) { }
- @for (int i = 0; i < Model.NodeInfo.Length; i++) + @for (var i = 0; i < Model.NodeInfo.Length; i++) { - var nodeInfo = Model.NodeInfo[i]; -
+ var nodeInfo = Model.NodeInfo[i].ToString(); +
@Model.CryptoCode - +
-
- +
+