From 697eea20c057e89a7ffcade77bc0738cf0c5391b Mon Sep 17 00:00:00 2001 From: 6d486f49 <76097bcc@gmail.com> Date: Thu, 11 Jun 2026 16:36:25 -0400 Subject: [PATCH] ... --- Pages/Pages/Database/CatalogPage.razor | 18 +- .../Parts/CatalogEntityDialogComponent.razor | 733 ++++++++++++++++++ 2 files changed, 747 insertions(+), 4 deletions(-) create mode 100644 Pages/Pages/Database/Parts/CatalogEntityDialogComponent.razor diff --git a/Pages/Pages/Database/CatalogPage.razor b/Pages/Pages/Database/CatalogPage.razor index 4c2f319..4a5ffe6 100644 --- a/Pages/Pages/Database/CatalogPage.razor +++ b/Pages/Pages/Database/CatalogPage.razor @@ -6,7 +6,6 @@ @implements IDisposable @inject IEntityDisplayService EntityDisplayService -@inject NavigationManager NavigationManager Catalog @@ -32,7 +31,7 @@ @foreach (var entity in searches) { -
+
@entity.Info().Name @entity.EntityType.Replace("_", " ") @@ -113,6 +112,11 @@ +@if (selectedEntity != null) +{ + +} + + +@code { + + [Parameter] public EntityModel Entity { get; set; } = default!; + + [Parameter] public EventCallback OnClose { get; set; } + + List history = new(); + EntityModel Current => history.Count > 0 ? EntityModel.Get(history[^1]) : Entity; + + protected override void OnInitialized() + { + base.OnInitialized(); + if (Entity != null) + { + history.Add(Entity.DataType); + } + } + + async Task Close() + { + await OnClose.InvokeAsync(); + } + + void NavigateTo(string entityId) + { + if (EntityData.Get().ContainsKey(entityId)) + { + history.Add(entityId); + StateHasChanged(); + } + } + + void GoBack() + { + if (history.Count > 1) + { + history.RemoveAt(history.Count - 1); + StateHasChanged(); + } + } + +}