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

@ -22,7 +22,12 @@ else
<Row>
<td>@context.Name</td>
<td>@context.Version</td>
<td><ActionLink Action="Delete" Parameters="@($"id=" + context.ThemeName)" Class="btn btn-danger" /></td>
<td>
@if (context.AssemblyName != "Oqtane.Client")
{
<button type="button" class="btn btn-danger" @onclick=@(async () => await DeleteTheme(context.ThemeName))>Delete</button>
}
</td>
<td>
@if (UpgradeAvailable(context.ThemeName, context.Version))
{
@ -62,4 +67,10 @@ else
await ThemeService.InstallThemesAsync();
NavigationManager.NavigateTo(NavigateUrl(Reload.Application));
}
private async Task DeleteTheme(string themename)
{
await ThemeService.DeleteThemeAsync(themename);
NavigationManager.NavigateTo(NavigateUrl(Reload.Application));
}
}