@page "/design/templates" @using ZB.MOM.WW.ScadaBridge.Security @using ZB.MOM.WW.ScadaBridge.Commons.Entities.Templates @using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories @using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums @using ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared @using ZB.MOM.WW.ScadaBridge.TemplateEngine @using ZB.MOM.WW.ScadaBridge.TemplateEngine.Services @attribute [Authorize(Policy = AuthorizationPolicies.RequireDesign)] @inject ITemplateEngineRepository TemplateEngineRepository @inject TemplateService TemplateService @inject TemplateFolderService TemplateFolderService @inject AuthenticationStateProvider AuthStateProvider @inject NavigationManager NavigationManager @inject IDialogService Dialog
@if (_loading) { } else if (_errorMessage != null) {
@_errorMessage
} else {

Templates

@if (!string.IsNullOrEmpty(_searchText)) { }
@* The root zone fills the scroll area so a right-click on empty space (or below the tree) opens a root-level context menu — New Folder / New Template at root. Node-level right-clicks are handled by the TreeView's own context menu (preventDefault'd there), so they don't bubble to this handler. *@
@RenderNodeLabel(node) @RenderNodeContextMenu(node) No templates yet. Use the buttons above (or right-click here) to create a folder or template.
@if (_showRootMenu) {
} }
@code { // CentralUI-024: delegates to the shared helper so the claim type stays // resolved through JwtTokenService rather than a duplicated magic string. private Task GetCurrentUserAsync() => AuthStateProvider.GetCurrentUsernameAsync(); private List