From 755aeb9901f736909eb1a8856f6d135b76b2d920 Mon Sep 17 00:00:00 2001 From: 6d486f49 <76097bcc@gmail.com> Date: Thu, 11 Jun 2026 16:23:05 -0400 Subject: [PATCH] ... --- Pages/Pages/Database/CatalogPage.razor | 2 +- .../Parts/CatalogEntityFilterComponent.razor | 197 ++++++++++++++++++ 2 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 Pages/Pages/Database/Parts/CatalogEntityFilterComponent.razor diff --git a/Pages/Pages/Database/CatalogPage.razor b/Pages/Pages/Database/CatalogPage.razor index 5c8ad1a..4c2f319 100644 --- a/Pages/Pages/Database/CatalogPage.razor +++ b/Pages/Pages/Database/CatalogPage.razor @@ -20,7 +20,7 @@ - +
@searches.Count @(searches.Count == 1 ? "entity" : "entities") diff --git a/Pages/Pages/Database/Parts/CatalogEntityFilterComponent.razor b/Pages/Pages/Database/Parts/CatalogEntityFilterComponent.razor new file mode 100644 index 0000000..a3a038a --- /dev/null +++ b/Pages/Pages/Database/Parts/CatalogEntityFilterComponent.razor @@ -0,0 +1,197 @@ +@using Model.Entity.Data + +
+
+ Faction +
+ @foreach (var choice in EntityFilterService.GetFactionChoices()) + { + + } +
+
+ + @if (EntityFilterService.GetFactionType() != "Any" && EntityFilterService.GetFactionType() != "None") + { +
+ Immortal +
+ @foreach (var choice in EntityFilterService.GetImmortalChoices()) + { + + } +
+
+ } + +
+ Type +
+ @foreach (var choice in EntityFilterService.GetEntityChoices()) + { + + } +
+
+ +
+ + + + + +
+
+ + + +@code { + + [Inject] public IEntityFilterService EntityFilterService { get; set; } = default!; + + string searchText = ""; + + protected override void OnInitialized() + { + base.OnInitialized(); + searchText = EntityFilterService.GetSearchText(); + } + + void OnChangeFaction(string choice) + { + EntityFilterService.SelectFactionType(choice); + } + + void OnChangeImmortal(string choice) + { + EntityFilterService.SelectImmortalType(choice); + } + + void OnChangeEntity(string choice) + { + EntityFilterService.SelectEntityType(choice); + } + + void OnSearchChanged() + { + EntityFilterService.EnterSearchText(searchText); + } + +}