improve user experience after app restarts

This commit is contained in:
Shaun Walker
2020-06-02 14:21:57 -04:00
parent ec11587b28
commit c4f1d37421
7 changed files with 156 additions and 97 deletions

View File

@ -4,6 +4,7 @@
@inject NavigationManager NavigationManager
@inject IThemeService ThemeService
@inject IPackageService PackageService
@inject IJSRuntime JsRuntime
@if (_themes == null)
{
@ -83,9 +84,11 @@ else
try
{
await PackageService.DownloadPackageAsync(themename, version, "Themes");
await ThemeService.InstallThemesAsync();
await logger.LogInformation("Theme Downloaded {ThemeName} {Version}", themename, version);
NavigationManager.NavigateTo(NavigateUrl());
ShowProgressIndicator();
var interop = new Interop(JsRuntime);
await interop.RedirectBrowser(NavigateUrl(), 3);
await ThemeService.InstallThemesAsync();
}
catch (Exception ex)
{
@ -98,9 +101,10 @@ else
{
try
{
ShowProgressIndicator();
var interop = new Interop(JsRuntime);
await interop.RedirectBrowser(NavigateUrl(), 3);
await ThemeService.DeleteThemeAsync(Theme.ThemeName);
await logger.LogInformation("Theme Deleted {Theme}", Theme);
NavigationManager.NavigateTo(NavigateUrl());
}
catch (Exception ex)
{