diff --git a/Oqtane.Client/Services/Interfaces/IThemeService.cs b/Oqtane.Client/Services/Interfaces/IThemeService.cs index 6ad83fba..4dc636c2 100644 --- a/Oqtane.Client/Services/Interfaces/IThemeService.cs +++ b/Oqtane.Client/Services/Interfaces/IThemeService.cs @@ -25,11 +25,12 @@ namespace Oqtane.Services Task GetThemeAsync(int themeId, int siteId); /// - /// Returns a theme s containing a theme control type + /// Returns a theme s containing a specific theme control type /// /// + /// /// - Theme GetTheme(List themes, string themeType); + Theme GetTheme(List themes, string themeControlType); /// /// Returns a list of s from the given themes @@ -39,19 +40,20 @@ namespace Oqtane.Services List GetThemeControls(List themes); /// - /// Returns a list of s from the given themes with a matching theme type + /// Returns a list of s for a theme containing a specific theme control type /// /// + /// /// - List GetThemeControls(List themes, string themeType); + List GetThemeControls(List themes, string themeControlType); /// - /// Returns a list of containers () from the given themes with a matching theme type + /// Returns a list of containers () for a theme containing a specific theme control type /// /// - /// + /// /// - List GetContainerControls(List themes, string themeType); + List GetContainerControls(List themes, string themeControlType); /// /// Updates a existing theem diff --git a/Oqtane.Client/Services/ThemeService.cs b/Oqtane.Client/Services/ThemeService.cs index e4cf06d6..d1c03495 100644 --- a/Oqtane.Client/Services/ThemeService.cs +++ b/Oqtane.Client/Services/ThemeService.cs @@ -26,9 +26,9 @@ namespace Oqtane.Services return await GetJsonAsync($"{ApiUrl}/{themeId}?siteid={siteId}"); } - public Theme GetTheme(List themes, string themeType) + public Theme GetTheme(List themes, string themeControlType) { - return themes.FirstOrDefault(item => item.Themes.Any(item => item.TypeName == themeType)); + return themes.FirstOrDefault(item => item.Themes.Any(item => item.TypeName == themeControlType)); } public List GetThemeControls(List themes) @@ -36,15 +36,15 @@ namespace Oqtane.Services return themes.SelectMany(item => item.Themes).OrderBy(item => item.Name).ToList(); } - public List GetThemeControls(List themes, string themeType) + public List GetThemeControls(List themes, string themeControlType) { - return GetTheme(themes, themeType)?.Themes.OrderBy(item => item.Name).ToList(); + return GetTheme(themes, themeControlType)?.Themes.OrderBy(item => item.Name).ToList(); } - public List GetContainerControls(List themes, string themeType) + public List GetContainerControls(List themes, string themeControlType) { - return GetTheme(themes, themeType)?.Containers.OrderBy(item => item.Name).ToList(); + return GetTheme(themes, themeControlType)?.Containers.OrderBy(item => item.Name).ToList(); } public async Task UpdateThemeAsync(Theme theme)