refactoring of #518 to simplify registration of scripts in modules and themes

This commit is contained in:
Shaun Walker
2020-06-14 12:07:16 -04:00
parent ea89cc1a64
commit 4e6b4a20ef
17 changed files with 106 additions and 207 deletions

View File

@ -4,7 +4,6 @@
@inject IFileService FileService
@inject IThemeService ThemeService
@inject IPackageService PackageService
@inject IJSRuntime JsRuntime
@if (_packages != null)
{
@ -79,7 +78,7 @@
try
{
ShowProgressIndicator();
var interop = new Interop(JsRuntime);
var interop = new Interop(JSRuntime);
await interop.RedirectBrowser(NavigateUrl(), 3);
await ThemeService.InstallThemesAsync();
}

View File

@ -4,7 +4,6 @@
@inject NavigationManager NavigationManager
@inject IThemeService ThemeService
@inject IPackageService PackageService
@inject IJSRuntime JsRuntime
@if (_themes == null)
{
@ -86,7 +85,7 @@ else
await PackageService.DownloadPackageAsync(themename, version, "Themes");
await logger.LogInformation("Theme Downloaded {ThemeName} {Version}", themename, version);
ShowProgressIndicator();
var interop = new Interop(JsRuntime);
var interop = new Interop(JSRuntime);
await interop.RedirectBrowser(NavigateUrl(), 3);
await ThemeService.InstallThemesAsync();
}
@ -102,7 +101,7 @@ else
try
{
ShowProgressIndicator();
var interop = new Interop(JsRuntime);
var interop = new Interop(JSRuntime);
await interop.RedirectBrowser(NavigateUrl(), 3);
await ThemeService.DeleteThemeAsync(Theme.ThemeName);
}