diff --git a/art/transparent.png b/art/transparent.png index 189036f..a27e482 100644 Binary files a/art/transparent.png and b/art/transparent.png differ diff --git a/src/Netstr/Controllers/HomeController.cs b/src/Netstr/Controllers/HomeController.cs index e19b01e..4009ba4 100644 --- a/src/Netstr/Controllers/HomeController.cs +++ b/src/Netstr/Controllers/HomeController.cs @@ -8,10 +8,12 @@ namespace Netstr.Controllers public class HomeController : Controller { private readonly IRelayInformationService service; + private readonly IHostEnvironment environment; - public HomeController(IRelayInformationService service) + public HomeController(IRelayInformationService service, IHostEnvironment environment) { this.service = service; + this.environment = environment; } [HttpGet] @@ -23,7 +25,7 @@ public IActionResult Index() } else { - var vm = new HomeViewModel(this.service.GetDocument(), $"wss://{Request.Host}"); + var vm = new HomeViewModel(this.service.GetDocument(), $"wss://{Request.Host}", this.environment.EnvironmentName); return View(vm); } } diff --git a/src/Netstr/ViewModels/HomeViewModel.cs b/src/Netstr/ViewModels/HomeViewModel.cs index ab93b8e..0796966 100644 --- a/src/Netstr/ViewModels/HomeViewModel.cs +++ b/src/Netstr/ViewModels/HomeViewModel.cs @@ -2,7 +2,10 @@ namespace Netstr.ViewModels { - public record HomeViewModel(RelayInformationModel RelayInformation, string ConnectionLink) + public record HomeViewModel( + RelayInformationModel RelayInformation, + string ConnectionLink, + string Environment) { } } diff --git a/src/Netstr/Views/Home/Index.cshtml b/src/Netstr/Views/Home/Index.cshtml index d9a35f9..daa0497 100644 --- a/src/Netstr/Views/Home/Index.cshtml +++ b/src/Netstr/Views/Home/Index.cshtml @@ -22,14 +22,14 @@ } Pubkey - @Model.RelayInformation.PublicKey + @Model.RelayInformation.PublicKey Supported NIPs @foreach (var nip in @Model.RelayInformation.SupportedNips) { - @nip + @nip } @@ -41,6 +41,10 @@ Software @Model.RelayInformation.Software + + Environment + @Model.Environment +
diff --git a/src/Netstr/Views/Home/Index.cshtml.css b/src/Netstr/Views/Home/Index.cshtml.css index 0e9cc8c..7f0de36 100644 --- a/src/Netstr/Views/Home/Index.cshtml.css +++ b/src/Netstr/Views/Home/Index.cshtml.css @@ -28,7 +28,7 @@ table { } tr:hover td:nth-child(2) { - opacity: 0.5; + opacity: 0.8; } td { @@ -46,6 +46,7 @@ td a { td:first-child { background-color: #6A1B9A; font-weight: bold; + white-space: nowrap; } .connect-box { @@ -57,4 +58,12 @@ td:first-child { .connect-box strong { font-weight: bold; +} + +/*Dark mode*/ +@media (prefers-color-scheme: dark) { + .container { + background: linear-gradient(313deg, #2e2e2e 0%, #5e5e5e 100%); + color: white; + } } \ No newline at end of file