mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
Add about/community info guidelines/social page
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -11,6 +11,9 @@ namespace SharedLibraryCore.Configuration
|
||||
{
|
||||
public class ApplicationConfiguration : IBaseConfiguration
|
||||
{
|
||||
[ConfigurationIgnore]
|
||||
public CommunityInformationConfiguration CommunityInformation { get; set; } = new CommunityInformationConfiguration();
|
||||
|
||||
[LocalizedDisplayName("SETUP_ENABLE_WEBFRONT")]
|
||||
[ConfigurationLinked("WebfrontBindUrl", "ManualWebfrontUrl", "WebfrontPrimaryColor", "WebfrontSecondaryColor",
|
||||
"WebfrontCustomBranding")]
|
||||
|
@ -0,0 +1,40 @@
|
||||
namespace SharedLibraryCore.Configuration
|
||||
{
|
||||
public class CommunityInformationConfiguration
|
||||
{
|
||||
public string Name { get; set; } = "IW4MAdmin - Configure In IW4MAdminSettings.json";
|
||||
public string Description { get; set; } =
|
||||
"IW4MAdmin is an administration tool for IW4x, Pluto T6, Pluto IW5, CoD4x, TeknoMW3, and most Call of Duty® dedicated servers. It allows complete control of your server; from changing maps, to banning players, IW4MAdmin monitors and records activity on your server(s). With plugin support, extending its functionality is a breeze.";
|
||||
public bool EnableBanner { get; set; } = true;
|
||||
|
||||
public SocialAccountConfiguration[] SocialAccounts { get; set; } =
|
||||
{
|
||||
new SocialAccountConfiguration
|
||||
{
|
||||
Title = "IW4MAdmin Website",
|
||||
Url = "https://raidmax.org/IW4MAdmin",
|
||||
IconId = "oi-globe"
|
||||
},
|
||||
new SocialAccountConfiguration
|
||||
{
|
||||
Title = "IW4MAdmin Github",
|
||||
Url = "https://github.com/RaidMax/IW4M-Admin/",
|
||||
IconUrl = "github.svg"
|
||||
},
|
||||
new SocialAccountConfiguration
|
||||
{
|
||||
Title = "IW4MAdmin Youtube",
|
||||
Url = "https://www.youtube.com/watch?v=xpxEO4Qi0cQ",
|
||||
IconUrl = "https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/youtube.svg"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public class SocialAccountConfiguration
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string IconUrl { get; set; }
|
||||
public string IconId { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user