Fix Settings nav and scope admin sidebar active-class toggle
Build and Push Docker Image / build-and-push (push) Successful in 36s
Build and Push Docker Image / build-and-push (push) Successful in 36s
- Include .admin-sidebar-footer .nav-pill in click listener so Settings is reachable - Update showPanel to toggle active class on both .admin-nav and footer pills Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
7775c4fc3a
commit
43850693ac
1 file changed
+2
-2
+2
-2
@@ -110,7 +110,7 @@ if (parentPin) unlock();
|
||||
|
||||
// ---------- navigation ----------
|
||||
|
||||
document.querySelectorAll('.admin-nav .nav-pill').forEach((pill) =>
|
||||
document.querySelectorAll('.admin-nav .nav-pill, .admin-sidebar-footer .nav-pill').forEach((pill) =>
|
||||
pill.addEventListener('click', () => showPanel(pill.dataset.panel))
|
||||
);
|
||||
document.querySelectorAll('[data-nav]').forEach((btn) =>
|
||||
@@ -126,7 +126,7 @@ const PANEL_TITLES = {
|
||||
|
||||
function showPanel(name) {
|
||||
document.querySelectorAll('.panel').forEach((p) => (p.hidden = p.id !== `panel-${name}`));
|
||||
document.querySelectorAll('.admin-nav .nav-pill').forEach((p) => p.classList.toggle('active', p.dataset.panel === name));
|
||||
document.querySelectorAll('.admin-nav .nav-pill, .admin-sidebar-footer .nav-pill').forEach((p) => p.classList.toggle('active', p.dataset.panel === name));
|
||||
const titleEl = document.getElementById('admin-page-title');
|
||||
if (titleEl) titleEl.textContent = PANEL_TITLES[name] || name;
|
||||
const loaders = {
|
||||
|
||||
Reference in new issue
Block a user