add theme creator module to simplify the scaffolding of external themes
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -12,5 +12,7 @@ namespace Oqtane.Services
|
||||
List<ThemeControl> GetContainerControls(List<Theme> themes, string themeName);
|
||||
Task InstallThemesAsync();
|
||||
Task DeleteThemeAsync(string themeName);
|
||||
Task<Theme> CreateThemeAsync(Theme theme);
|
||||
Task<List<string>> GetThemeTemplatesAsync();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
@ -50,5 +50,16 @@ namespace Oqtane.Services
|
||||
{
|
||||
await DeleteAsync($"{ApiUrl}/{themeName}");
|
||||
}
|
||||
|
||||
public async Task<Theme> CreateThemeAsync(Theme theme)
|
||||
{
|
||||
return await PostJsonAsync($"{ApiUrl}", theme);
|
||||
}
|
||||
|
||||
public async Task<List<string>> GetThemeTemplatesAsync()
|
||||
{
|
||||
List<string> templates = await GetJsonAsync<List<string>>($"{ApiUrl}/templates");
|
||||
return templates;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user