1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-07 21:58:06 -05:00

add script injection to the config to import custom webfront scripts (ie google tracking)

This commit is contained in:
RaidMax 2021-10-19 20:17:10 -05:00
parent bbab849224
commit 720d253fbb
4 changed files with 12 additions and 0 deletions

View File

@ -145,6 +145,7 @@ namespace SharedLibraryCore
ViewBag.EnableColorCodes = AppConfig.EnableColorCodes; ViewBag.EnableColorCodes = AppConfig.EnableColorCodes;
ViewBag.EnablePrivilegedUserPrivacy = AppConfig.EnablePrivilegedUserPrivacy; ViewBag.EnablePrivilegedUserPrivacy = AppConfig.EnablePrivilegedUserPrivacy;
ViewBag.Configuration = AppConfig; ViewBag.Configuration = AppConfig;
ViewBag.ScriptInjection = AppConfig.Webfront?.ScriptInjection;
base.OnActionExecuting(context); base.OnActionExecuting(context);
} }

View File

@ -38,6 +38,9 @@ namespace SharedLibraryCore.Configuration
[LocalizedDisplayName("WEBFRONT_CONFIGURATION_CUSTOM_BRANDING")] [LocalizedDisplayName("WEBFRONT_CONFIGURATION_CUSTOM_BRANDING")]
public string WebfrontCustomBranding { get; set; } public string WebfrontCustomBranding { get; set; }
[ConfigurationIgnore]
public WebfrontConfiguration Webfront { get; set; } = new WebfrontConfiguration();
[LocalizedDisplayName("SETUP_ENABLE_MULTIOWN")] [LocalizedDisplayName("SETUP_ENABLE_MULTIOWN")]
public bool EnableMultipleOwners { get; set; } public bool EnableMultipleOwners { get; set; }

View File

@ -0,0 +1,7 @@
namespace SharedLibraryCore.Configuration
{
public class WebfrontConfiguration
{
public string ScriptInjection { get; set; }
}
}

View File

@ -202,5 +202,6 @@
}); });
</script> </script>
@await RenderSectionAsync("scripts", required: false) @await RenderSectionAsync("scripts", required: false)
@Html.Raw(ViewBag.ScriptInjection);
</body> </body>
</html> </html>