1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-13 00:28:10 -05:00

Add about/community info guidelines/social page

This commit is contained in:
RaidMax
2021-10-09 21:11:47 -05:00
parent 9f859c5d23
commit 60681458c4
11 changed files with 226 additions and 10 deletions

View File

@ -57,6 +57,7 @@ namespace SharedLibraryCore
ViewBag.Version = Manager.Version;
ViewBag.IsFluid = false;
ViewBag.EnableColorCodes = Manager.GetApplicationSettings().Configuration().EnableColorCodes;
ViewBag.Language = Utilities.CurrentLocalization.Culture.TwoLetterISOLanguageName;
Client ??= new EFClient()
{
@ -125,6 +126,9 @@ namespace SharedLibraryCore
SignInAsync(new ClaimsPrincipal(claimsIdentity)).Wait();
}
var communityName = Manager.GetApplicationSettings().Configuration().CommunityInformation?.Name;
var shouldUseCommunityName = !string.IsNullOrWhiteSpace(communityName) && !communityName.Contains("IW4MAdmin");
ViewBag.Authorized = Authorized;
ViewBag.Url = Manager.GetApplicationSettings().Configuration().WebfrontUrl;
ViewBag.User = Client;
@ -133,7 +137,9 @@ namespace SharedLibraryCore
ViewBag.SocialTitle = SocialTitle;
ViewBag.Pages = Pages;
ViewBag.Localization = Utilities.CurrentLocalization.LocalizationIndex;
ViewBag.CustomBranding = Manager.GetApplicationSettings().Configuration().WebfrontCustomBranding ?? "IW4MAdmin";
ViewBag.CustomBranding = shouldUseCommunityName
? communityName
: Manager.GetApplicationSettings().Configuration().WebfrontCustomBranding ?? "IW4MAdmin";
ViewBag.EnableColorCodes = Manager.GetApplicationSettings().Configuration().EnableColorCodes;
ViewBag.EnablePrivilegedUserPrivacy = Manager.GetApplicationSettings().Configuration().EnablePrivilegedUserPrivacy;