Added support for friendly names and thumbnails in theme, layout, and container components. Added fallback support during loading for themes, layout, and containers.

This commit is contained in:
Shaun Walker
2020-06-01 14:58:46 -04:00
parent f45cb8b069
commit 1b7ca45d4a
26 changed files with 222 additions and 200 deletions

View File

@ -25,9 +25,9 @@
<td>
<select id="container" class="form-control" @bind="@_containerType">
<option value="-">&lt;Inherit From Page Or Site&gt;</option>
@foreach (KeyValuePair<string, string> container in _containers)
@foreach (var container in _containers)
{
<option value="@container.Key">@container.Value</option>
<option value="@container.TypeName">@container.Name</option>
}
</select>
</td>
@ -85,7 +85,7 @@
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
@code {
private Dictionary<string, string> _containers;
private List<ThemeControl> _containers = new List<ThemeControl>();
private string _title;
private string _containerType;
private string _allPages = "false";
@ -105,7 +105,7 @@
protected override async Task OnInitializedAsync()
{
_title = ModuleState.Title;
_containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync(), PageState.Page.ThemeType);
_containers = ThemeService.GetContainerControls(await ThemeService.GetThemesAsync(), PageState.Page.ThemeType);
_containerType = ModuleState.ContainerType;
if (!string.IsNullOrEmpty(PageState.Page.DefaultContainerType) && _containerType == PageState.Page.DefaultContainerType)
{