Updated UI. Fixed circle search performance.
All checks were successful
ci / build-test (push) Successful in 1m43s
ci / publish-image (push) Has been skipped

This commit is contained in:
2025-11-10 18:55:46 -05:00
parent 840bec72d2
commit 9cd9230cec
43 changed files with 1105 additions and 164 deletions

View File

@@ -1,11 +1,8 @@
using JSMR.Application.Tags.Queries.Search;
using JSMR.Application.VoiceWorks.Queries.Search;
using JSMR.UI.Blazor;
using JSMR.UI.Blazor.Services;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.AspNetCore.Mvc;
using MudBlazor.Services;
using System.Net.Http.Json;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
@@ -21,28 +18,4 @@ builder.Services.AddMudServices();
builder.Services.AddScoped<VoiceWorksClient>();
await builder.Build().RunAsync();
public class VoiceWorksClient(HttpClient http)
{
public async Task<SearchVoiceWorksResponse?> SearchAsync(SearchVoiceWorksRequest request, CancellationToken ct = default)
{
using var resp = await http.PostAsJsonAsync("/api/voiceworks/search", request, ct);
return await resp.Content.ReadFromJsonAsync<SearchVoiceWorksResponse>(cancellationToken: ct);
}
public async Task<SearchTagsResponse?> SearchAsync(SearchTagsRequest request, CancellationToken ct = default)
{
using var resp = await http.PostAsJsonAsync("/api/tags/search", request, ct);
return await resp.Content.ReadFromJsonAsync<SearchTagsResponse>(cancellationToken: ct);
}
}
public record VoiceWorkDto(string ProductId, string ProductName);
// Tiny helper result type
public readonly record struct Result<T>(bool Ok, T? Value, string? Error)
{
public static Result<T> Success(T v) => new(true, v, null);
public static Result<T> Failure(string e) => new(false, default, e);
}
await builder.Build().RunAsync();