minor ui fixes (#668)

* remove unused package

* fix controller name

* catch and ignore jsruntime exceptions

* separate debug stage from public stage
This commit is contained in:
Jason Dove
2022-03-02 20:45:07 -06:00
committed by GitHub
parent 24ef5e68eb
commit 2058c44949
8 changed files with 59 additions and 17 deletions
+13 -5
View File
@@ -313,15 +313,23 @@
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await _jsRuntime.InvokeVoidAsync("sortableCollection", Id);
if (_data.UseCustomPlaybackOrder)
try
{
await _jsRuntime.InvokeVoidAsync("enableSorting");
await _jsRuntime.InvokeVoidAsync("sortableCollection", Id);
if (_data.UseCustomPlaybackOrder)
{
await _jsRuntime.InvokeVoidAsync("enableSorting");
}
else
{
await _jsRuntime.InvokeVoidAsync("disableSorting");
}
}
else
catch (Exception)
{
await _jsRuntime.InvokeVoidAsync("disableSorting");
// ignored
}
await base.OnAfterRenderAsync(firstRender);
}
+8 -1
View File
@@ -35,7 +35,14 @@ namespace ErsatzTV.Pages
{
if (firstRender)
{
await NavManager.NavigateToFragmentAsync(JsRuntime);
try
{
await NavManager.NavigateToFragmentAsync(JsRuntime);
}
catch (Exception)
{
// ignored
}
}
}
+11 -1
View File
@@ -125,7 +125,17 @@
{
Either<BaseError, string> maybeUrl = await _mediator.Send(new StartPlexPinFlow());
await maybeUrl.Match(
async url => await _jsRuntime.InvokeAsync<object>("open", new object[] { url, "_blank" }),
async url =>
{
try
{
await _jsRuntime.InvokeAsync<object>("open", new object[] { url, "_blank" });
}
catch (Exception)
{
// ignored
}
},
error =>
{
_locker.UnlockPlex();
+8 -1
View File
@@ -180,7 +180,14 @@
{
if (firstRender)
{
await _navigationManager.NavigateToFragmentAsync(_jsRuntime);
try
{
await _navigationManager.NavigateToFragmentAsync(_jsRuntime);
}
catch (Exception)
{
// ignored
}
}
}