Prettify the bitcoin core node page

This commit is contained in:
nicolas.dorier 2019-05-07 14:44:26 +09:00
parent b6c37a73b1
commit 232ceed8b0
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
3 changed files with 15 additions and 3 deletions

View file

@ -601,7 +601,7 @@ namespace BTCPayServer.Controllers
{ {
ShowQR = showQR, ShowQR = showQR,
WalletName = service.ServiceName, WalletName = service.ServiceName,
ServiceLink = service.ConnectionString.Server.AbsoluteUri ServiceLink = service.ConnectionString.Server.AbsoluteUri.WithoutEndingSlash()
}); });
} }
var connectionString = await service.ConnectionString.Expand(this.Request.GetAbsoluteUriNoPathBase(), service.Type); var connectionString = await service.ConnectionString.Expand(this.Request.GetAbsoluteUriNoPathBase(), service.Type);

View file

@ -132,6 +132,12 @@ namespace BTCPayServer
return str; return str;
return $"/{str}"; return $"/{str}";
} }
public static string WithoutEndingSlash(this string str)
{
if (str.EndsWith("/", StringComparison.InvariantCulture))
return str.Substring(0, str.Length - 1);
return str;
}
public static void SetHeaderOnStarting(this HttpResponse resp, string name, string value) public static void SetHeaderOnStarting(this HttpResponse resp, string name, string value)
{ {

View file

@ -27,9 +27,9 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<div class="form-group"> <div class="form-group">
<h5>QR Code connection</h5> <h5>Full node connection</h5>
<p> <p>
<span>You can use QR Code to connect to @Model.WalletName with compatible wallets.<br /></span> <span>This page exposes information to connect remotely to your full node via the P2P protocol.</span>
</p> </p>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -52,6 +52,12 @@
</div> </div>
</div> </div>
<div class="form-group">
<h5>QR Code connection</h5>
<p>
<span>You can use QR Code to connect to @Model.WalletName with compatible wallets.<br /></span>
</p>
</div>
<div class="form-group"> <div class="form-group">
@if (!Model.ShowQR) @if (!Model.ShowQR)
{ {