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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,14 @@ namespace ErsatzTV.Pages
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
await NavManager.NavigateToFragmentAsync(JsRuntime);
|
||||
try
|
||||
{
|
||||
await NavManager.NavigateToFragmentAsync(JsRuntime);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -180,7 +180,14 @@
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
await _navigationManager.NavigateToFragmentAsync(_jsRuntime);
|
||||
try
|
||||
{
|
||||
await _navigationManager.NavigateToFragmentAsync(_jsRuntime);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user