From 8a7825f3bda92328eac256916273ff4a9e214f43 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Thu, 9 Jul 2020 17:22:28 +0200 Subject: [PATCH] Improve service settings view --- BTCPayServer/Views/Server/Services.cshtml | 253 ++++++++++------------ 1 file changed, 117 insertions(+), 136 deletions(-) diff --git a/BTCPayServer/Views/Server/Services.cshtml b/BTCPayServer/Views/Server/Services.cshtml index a787c125e..54d8396eb 100644 --- a/BTCPayServer/Views/Server/Services.cshtml +++ b/BTCPayServer/Views/Server/Services.cshtml @@ -6,178 +6,104 @@
-
+
-
+
+
+

Crypto services exposed by your server

-
-

Crypto services

-
- You can get access here to services exposed by your server -
- -
- - +
+ - - - @foreach (var s in Model.ExternalServices.Where(service => !string.IsNullOrEmpty(service.CryptoCode))) - { - - - - - - } - -
Crypto Access Type Actions
@s.CryptoCode - @s.DisplayName - @if (s.ConnectionString.IsOnion() == true || - (s.ConnectionString.IsOnion() == false && this.Context.Request.IsOnion())) - { - - } - - See information -
-
+ + + @foreach (var s in Model.ExternalServices.Where(service => !string.IsNullOrEmpty(service.CryptoCode))) + { + + @s.CryptoCode + + @s.DisplayName + @if (s.ConnectionString.IsOnion() == true || + (s.ConnectionString.IsOnion() == false && this.Context.Request.IsOnion())) + { + + } + + + See information + + + } + +
@if (Model.OtherExternalServices.Count != 0 || Model.ExternalServices.Any(service => string.IsNullOrEmpty(service.CryptoCode))) { -
-
-

Other services

-
- Other external services -
-
- - +
+
+

Other external services

+ +
+ - - - @foreach (var s in Model.ExternalServices.Where(service => string.IsNullOrEmpty(service.CryptoCode))) - { - - - - - } - @foreach (var s in Model.OtherExternalServices) - { - - - - - } - -
Name Actions
@s.DisplayName - See information -
@s.Name - See information -
-
+ + + @foreach (var s in Model.ExternalServices.Where(service => string.IsNullOrEmpty(service.CryptoCode))) + { + + @s.DisplayName + + See information + + + } + @foreach (var s in Model.OtherExternalServices) + { + + @s.Name + + See information + + + } + +
} @if (Model.TorHttpServices.Count != 0) { -
-
-

HTTP TOR hidden services

-
- TOR services hosted on this server, only http servers are listed here. -
-
- - - - - - - - - @foreach (var s in Model.TorHttpServices) - { - - - - - } - -
NameActions
@s.Name - See information -
-
-
-
-} +
+
+

HTTP-based TOR hidden services

-@if (Model.TorOtherServices.Count != 0) -{ -
-
-

Other TOR hidden services

-
- TOR services hosted on this server which are not http based. -
-
- - +
+ - - - @foreach (var s in Model.TorOtherServices) - { - - - - - } - -
Name Actions
@s.Name@s.Link
-
-
-
-} -
-
-

External storage services

-
- Integrated Storage providers to store file uploads from btcpay -
-
- - - - - - - @foreach (var s in Model.ExternalStorageServices) + @foreach (var s in Model.TorHttpServices) { } @@ -185,6 +111,61 @@
NameActions
@s.Name - Edit + See information
+} + +@if (Model.TorOtherServices.Count != 0) +{ +
+
+

Other TOR hidden services

+ + + + + + + + + + @foreach (var s in Model.TorOtherServices) + { + + + + + } + +
NameURL
@s.Name + @s.Link +
+
+
+} +
+
+

External storage services

+

Integrated storage providers to store file uploads from BTCPay Server.

+ + + + + + + + + + @foreach (var s in Model.ExternalStorageServices) + { + + + + + } + +
NameActions
@s.Name + Edit +
+
@section Scripts {