mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 06:35:13 +01:00
Improve Lightning settings display
This commit is contained in:
parent
285a30f67a
commit
3b3fac98ad
2 changed files with 33 additions and 6 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
@using BTCPayServer.Lightning
|
||||||
@model LightningSettingsViewModel
|
@model LightningSettingsViewModel
|
||||||
@{
|
@{
|
||||||
Layout = "../Shared/_NavLayout.cshtml";
|
Layout = "../Shared/_NavLayout.cshtml";
|
||||||
|
@ -20,12 +21,26 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@if (Model.LightningNodeType != LightningNodeType.Internal)
|
@if (Model.LightningNodeType != LightningNodeType.Internal)
|
||||||
|
{
|
||||||
|
if (LightningConnectionString.TryParse(Model.ConnectionString, out var cs))
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<th>Connection Type</th>
|
||||||
|
<td>@typeof(LightningConnectionType).DisplayName(cs.ConnectionType.ToString())</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Base URI</th>
|
||||||
|
<td>@cs.BaseUri</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<th>Connection String</th>
|
<th>Connection String</th>
|
||||||
<td class="text-break">@Model.ConnectionString</td>
|
<td>@Model.ConnectionString</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
@using System.Text.RegularExpressions
|
@using System.Text.RegularExpressions
|
||||||
|
@using BTCPayServer.Lightning
|
||||||
|
@using BTCPayServer.Services
|
||||||
@model PaymentMethodsViewModel
|
@model PaymentMethodsViewModel
|
||||||
@{
|
@{
|
||||||
Layout = "../Shared/_NavLayout.cshtml";
|
Layout = "../Shared/_NavLayout.cshtml";
|
||||||
|
@ -120,8 +122,18 @@
|
||||||
<strong class="me-3">@scheme.CryptoCode</strong>
|
<strong class="me-3">@scheme.CryptoCode</strong>
|
||||||
@if (isSetUp)
|
@if (isSetUp)
|
||||||
{
|
{
|
||||||
<span class="smMaxWidth text-truncate text-secondary me-3">@scheme.Address</span>
|
<span class="text-truncate text-secondary me-3" style="max-width:150px;">
|
||||||
<a class="text-secondary"
|
@if (LightningConnectionString.TryParse(scheme.Address, out var cs))
|
||||||
|
{
|
||||||
|
<span>@typeof(LightningConnectionType).DisplayName(cs.ConnectionType.ToString())</span>
|
||||||
|
<span>@cs.BaseUri.Host</span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@scheme.Address
|
||||||
|
}
|
||||||
|
</span>
|
||||||
|
<a class="text-secondary me-3"
|
||||||
asp-controller="PublicLightningNodeInfo"
|
asp-controller="PublicLightningNodeInfo"
|
||||||
asp-action="ShowLightningNodeInfo"
|
asp-action="ShowLightningNodeInfo"
|
||||||
asp-route-cryptoCode="@scheme.CryptoCode"
|
asp-route-cryptoCode="@scheme.CryptoCode"
|
||||||
|
|
Loading…
Add table
Reference in a new issue