From 957203ec7bd82e974df5e85270083c44059c6aca Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 3 Jun 2026 03:31:10 -0400 Subject: [PATCH] feat(centralui): MainLayout/NavMenu delegate to ZB.MOM.WW.Theme ThemeShell + kit nav --- .../Components/Layout/MainLayout.razor | 42 +- .../Components/Layout/NavMenu.razor | 415 +++++------------- .../Components/Layout/NavSection.razor | 35 -- .../Layout/NavMenuTests.cs | 155 ++++--- .../Pages/AuditLogPageScaffoldTests.cs | 15 +- 5 files changed, 237 insertions(+), 425 deletions(-) delete mode 100644 src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/NavSection.razor diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/MainLayout.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/MainLayout.razor index 388e2452..675eef3d 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/MainLayout.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/MainLayout.razor @@ -1,26 +1,28 @@ @inherits LayoutComponentBase -
- @* Hamburger toggle: visible only on viewports
+ + + + + @* CentralUI-024: claim type resolved via JwtTokenService. *@ + @context.User.GetDisplayName() +
+ @* CentralUI-017: logout is a state-changing POST and is + CSRF-protected — the antiforgery token is required. *@ + + + +
+
+
+ @Body + @* Global host for IDialogService. One instance per layout renders all confirm/prompt dialogs raised via IDialogService.ConfirmAsync / PromptAsync. *@ diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/NavMenu.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/NavMenu.razor index c4a7f508..f8abf82b 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/NavMenu.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/NavMenu.razor @@ -1,324 +1,117 @@ -@using System.Linq @using ZB.MOM.WW.ScadaBridge.Security @using Microsoft.AspNetCore.Components.Routing -@using Microsoft.JSInterop -@implements IDisposable -@inject NavigationManager Navigation -@inject IJSRuntime JS -