* wip * first pass at elasticsearch; movies kind of work * use field name constants * properly sort search results * fix some crashes * fix page map/jump letters * optimize page map using terms aggregation * index all item types * optionally use elastic search * code cleanup * automatically rebuild lucene index after improper shutdown * update changelog
19 lines
556 B
C#
19 lines
556 B
C#
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.JSInterop;
|
|
|
|
namespace ErsatzTV.Extensions;
|
|
|
|
public static class NavigationManagerExtensions
|
|
{
|
|
public static async Task NavigateToFragmentAsync(this NavigationManager navigationManager, IJSRuntime jSRuntime)
|
|
{
|
|
Uri uri = navigationManager.ToAbsoluteUri(navigationManager.Uri);
|
|
|
|
if (uri.Fragment.Length > 0)
|
|
{
|
|
await Task.Delay(250);
|
|
await jSRuntime.InvokeVoidAsync("blazorHelpers.scrollToFragment", uri.Fragment.Substring(1));
|
|
}
|
|
}
|
|
}
|