improvements to module/theme installation and removal

This commit is contained in:
Shaun Walker
2019-10-09 12:06:53 -04:00
parent 879dae75aa
commit 2607d4dbb3
23 changed files with 169 additions and 37 deletions

View File

@ -61,10 +61,10 @@ namespace Oqtane.Services
return themes.OrderBy(item => item.Name).ToList();
}
public Dictionary<string, string> GetThemeTypes(List<Theme> themes)
public Dictionary<string, string> GetThemeTypes(List<Theme> Themes)
{
var selectableThemes = new Dictionary<string, string>();
foreach (Theme theme in themes)
foreach (Theme theme in Themes)
{
foreach (string themecontrol in theme.ThemeControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
@ -74,10 +74,10 @@ namespace Oqtane.Services
return selectableThemes;
}
public Dictionary<string, string> GetPaneLayoutTypes(List<Theme> themes)
public Dictionary<string, string> GetPaneLayoutTypes(List<Theme> Themes)
{
var selectablePaneLayouts = new Dictionary<string, string>();
foreach (Theme theme in themes)
foreach (Theme theme in Themes)
{
foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
@ -87,10 +87,10 @@ namespace Oqtane.Services
return selectablePaneLayouts;
}
public Dictionary<string, string> GetContainerTypes(List<Theme> themes)
public Dictionary<string, string> GetContainerTypes(List<Theme> Themes)
{
var selectableContainers = new Dictionary<string, string>();
foreach (Theme theme in themes)
foreach (Theme theme in Themes)
{
foreach (string container in theme.ContainerControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
@ -104,5 +104,10 @@ namespace Oqtane.Services
{
await http.GetJsonAsync<List<string>>(apiurl + "/install");
}
public async Task DeleteThemeAsync(string ThemeName)
{
await http.DeleteAsync(apiurl + "/" + ThemeName);
}
}
}