ability to specify Resources in IModule and ITheme interfaces,, fixed module settings for personalized pages

This commit is contained in:
sbwalker
2023-05-19 18:08:15 -04:00
parent 2be48c3847
commit e41d9008b3
11 changed files with 506 additions and 446 deletions

View File

@ -6,6 +6,7 @@ namespace Oqtane.Repository
public interface IThemeRepository
{
IEnumerable<Theme> GetThemes();
List<Theme> FilterThemes(List<Theme> themes);
void DeleteTheme(string ThemeName);
}
}

View File

@ -79,6 +79,7 @@ namespace Oqtane.Repository
ModuleDefinition.SettingsType = moduleDefinition.SettingsType;
ModuleDefinition.ControlTypeTemplate = moduleDefinition.ControlTypeTemplate;
ModuleDefinition.IsPortable = moduleDefinition.IsPortable;
ModuleDefinition.Resources = moduleDefinition.Resources;
}
return ModuleDefinition;

View File

@ -144,6 +144,24 @@ namespace Oqtane.Repository
return themes;
}
public List<Theme> FilterThemes(List<Theme> themes)
{
var Themes = new List<Theme>();
foreach (Theme theme in themes)
{
var Theme = new Theme();
Theme.ThemeName = theme.ThemeName;
Theme.Name = theme.Name;
Theme.Resources = theme.Resources;
Theme.Themes = theme.Themes;
Theme.Containers = theme.Containers;
Themes.Add(Theme);
}
return Themes;
}
public void DeleteTheme(string ThemeName)
{
_cache.Remove("themes");