ThemeService Improvements
Centralized the code used to determine the available themes, panes, and containers. This isn't the most "ideal" way to handle this. However, it does improve the management of the code by centralizing the logic for theme selection. Future PR's development might improve this more.
This commit is contained in:
@ -80,14 +80,7 @@
|
||||
protected override async Task OnInitAsync()
|
||||
{
|
||||
title = ModuleState.Title;
|
||||
List<Theme> Themes = await ThemeService.GetThemesAsync();
|
||||
foreach (Theme theme in Themes)
|
||||
{
|
||||
foreach (string container in theme.ContainerControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
containers.Add(container, theme.Name + " - " + @Utilities.GetTypeNameClass(container));
|
||||
}
|
||||
}
|
||||
containers = ThemeService.CalculateSelectableContainers(await ThemeService.GetThemesAsync());
|
||||
containertype = ModuleState.ContainerType;
|
||||
viewpermissions = ModuleState.ViewPermissions;
|
||||
editpermissions = ModuleState.EditPermissions;
|
||||
|
Reference in New Issue
Block a user