diff --git a/JSMR.UI.Blazor/Pages/Creators.razor b/JSMR.UI.Blazor/Pages/Creators.razor index 4f420ab..4ca058f 100644 --- a/JSMR.UI.Blazor/Pages/Creators.razor +++ b/JSMR.UI.Blazor/Pages/Creators.razor @@ -5,7 +5,9 @@ @using JSMR.Application.Creators.Queries.Search @using JSMR.Application.Creators.Queries.Search.Contracts @using JSMR.UI.Blazor.Components +@using JSMR.UI.Blazor.Filters @using JSMR.UI.Blazor.Services +@using Microsoft.AspNetCore.WebUtilities Creators @@ -24,7 +26,9 @@ OnChange="HandleTableChange"> - + + @context.VoiceWorkCount.ToString("n0") + @if (context.Favorite) { @@ -74,6 +78,9 @@ @code { + [Inject] + protected NavigationManager NavigationManager { get; set; } = default!; + public string? Keywords { get; set; } public int PageNumber { get; set; } = 1; public int PageSize { get; set; } = 100; @@ -200,4 +207,18 @@ return finalSorts; } + + private void NavigateToVoiceWorkSearch(CreatorSearchItem item) + { + VoiceWorkFilterState state = new() + { + CreatorIds = [item.CreatorId] + }; + + //string basePath = new Uri(NavigationManager.Uri).GetLeftPart(UriPartial.Path); + string basePath = new Uri(NavigationManager.Uri).GetLeftPart(UriPartial.Authority); + string uri = QueryHelpers.AddQueryString($"{basePath}/voiceworks", state.ToQuery()); + + NavigationManager.NavigateTo(uri); + } } \ No newline at end of file diff --git a/JSMR.UI.Blazor/Pages/Tags.razor b/JSMR.UI.Blazor/Pages/Tags.razor index 515134d..d883795 100644 --- a/JSMR.UI.Blazor/Pages/Tags.razor +++ b/JSMR.UI.Blazor/Pages/Tags.razor @@ -1,60 +1,100 @@ @page "/tags" @inject VoiceWorksClient Client @inject IJSRuntime JS +@using AntDesign @using JSMR.Application.Common.Search @using JSMR.Application.Tags.Queries.Search @using JSMR.Application.Tags.Queries.Search.Contracts @using JSMR.UI.Blazor.Components +@using JSMR.UI.Blazor.Filters @using JSMR.UI.Blazor.Services +@using Microsoft.AspNetCore.WebUtilities Tags -

Tags

+
+@*

Tags

*@ - - -@* - - - - *@ - - - - - - - - @if (context.Favorite) - { - Favorite - } - - - @if (context.Blacklisted) - { - Blacklisted - } - - - +@* + *@ + + + + + + + + + + + @* + + + + + + *@ + + + + + + + @context.VoiceWorkCount.ToString("n0") + + + @if (context.Favorite) + { + Favorite + } + + + @if (context.Blacklisted) + { + Blacklisted + } + + + + + + + +
@code { + [Inject] + protected NavigationManager NavigationManager { get; set; } = default!; + public string? Keywords { get; set; } public int PageNumber { get; set; } = 1; public int PageSize { get; set; } = 100; @@ -146,8 +189,8 @@ private async Task HandleTableChange(AntDesign.TableModels.QueryModel queryModel) { - //PageNumber = queryModel.PageIndex; - //PageSize = queryModel.PageSize; + PageNumber = queryModel.PageIndex; + PageSize = queryModel.PageSize; _sortOptions = MapSortOptions(queryModel); @@ -202,4 +245,18 @@ return finalSorts; } + + private void NavigateToVoiceWorkSearch(TagSearchItem item) + { + VoiceWorkFilterState state = new() + { + TagIds = [item.TagId] + }; + + //string basePath = new Uri(NavigationManager.Uri).GetLeftPart(UriPartial.Path); + string basePath = new Uri(NavigationManager.Uri).GetLeftPart(UriPartial.Authority); + string uri = QueryHelpers.AddQueryString($"{basePath}/voiceworks", state.ToQuery()); + + NavigationManager.NavigateTo(uri); + } } \ No newline at end of file