From f165edf141c1389c67b12a9c7512d6532a72cb1a Mon Sep 17 00:00:00 2001 From: vickydotbat Date: Fri, 26 Jun 2026 10:25:57 +0200 Subject: [PATCH] fix admin button --- templates/partials/header/topbar.tpl | 4 ++-- tests/global-topbar-contract.test.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/partials/header/topbar.tpl b/templates/partials/header/topbar.tpl index a28b6d9..93f9623 100644 --- a/templates/partials/header/topbar.tpl +++ b/templates/partials/header/topbar.tpl @@ -17,7 +17,7 @@ {{{ if ./iconClass }}} {{{ end }}} - {{{ if ./text }}}{./text}{{{ end }}} + {{{ if ./text }}}{./text}{{{ end }}} {./content} {{{ if ./dropdown }}} @@ -117,7 +117,7 @@ {{{ if displayMenuItem(@root, @index) }}} {{{ if ./iconClass }}}{{{ end }}} - {{{ if ./text }}}{./text}{{{ end }}} + {{{ if ./text }}}{./text}{{{ end }}} {./content} {{{ end }}} diff --git a/tests/global-topbar-contract.test.js b/tests/global-topbar-contract.test.js index 98807b1..a6f2799 100644 --- a/tests/global-topbar-contract.test.js +++ b/tests/global-topbar-contract.test.js @@ -105,6 +105,8 @@ assertIncludes(topbar, '{{{ if config.loggedIn }}}', 'Topbar should branch on th assertIncludes(topbar, '{{{ if canChat }}}', 'Chat controls should remain permission-gated'); assertIncludes(topbar, '{{{ if allowRegistration }}}', 'Registration should remain server-gated'); assertIncludes(topbar, '{{{ each navigation }}}', 'Topbar should render ACP Navigation items'); +assertIncludes(topbar, '{./textClass}', 'Topbar should honor ACP Navigation text visibility classes'); +assertExcludes(topbar, 'href="{relative_path}/admin"', 'Topbar should not hard-code the administrator link'); assertMissing( 'templates/partials/header/brand.tpl',