From f169236613319491e5877a4fa00f97a010a99f05 Mon Sep 17 00:00:00 2001 From: jvyden Date: Fri, 10 Jun 2022 04:34:17 -0400 Subject: [PATCH] Put title before instance name, fix empty webhook title trailing dash --- .../Pages/Layouts/BaseLayout.cshtml | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml index f19c67e2..5b65cd09 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml @@ -25,20 +25,23 @@ } Model.IsMobile = Model.Request.IsMobile(); + + string title; + if (Model.Title == string.Empty) + { + title = ServerConfiguration.Instance.Customization.ServerName; + } + else + { + title = $"{Model.Title} - {ServerConfiguration.Instance.Customization.ServerName}"; + } } - @if (Model.Title == string.Empty) - { - @ServerConfiguration.Instance.Customization.ServerName - } - else - { - @ServerConfiguration.Instance.Customization.ServerName - @Model.Title - } + @title @@ -52,7 +55,7 @@ @* Embed Stuff *@ - + @if (!string.IsNullOrEmpty(Model.Description)) {