style(sidebar): enhance sidebar behavior for settings page

- Updated sidebar logic to collapse when on the settings page, improving user experience.
- Added CSS margin-top property to the table element for better layout consistency.
This commit is contained in:
UNITRONIX
2026-06-06 09:37:42 +02:00
parent f0ef809fb7
commit 69efcfa1dd
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -411,6 +411,7 @@ table {
padding: var(--space-sm) var(--space-md);
border-top: 1px solid var(--border-primary);
flex-shrink: 0;
margin-top: auto;
}
+5
View File
@@ -340,6 +340,11 @@
if (activeRail) {
activeCategory = activeRail.dataset.category;
showPanel(activeCategory);
} else if ('<%= currentPage %>' === 'settings') {
// Settings is a direct rail link — no flyout sub-menu, keep sidebar collapsed
isCollapsed = true;
sidebar.dataset.collapsed = 'true';
document.documentElement.style.setProperty('--sidebar-current-width', 'var(--sidebar-width-collapsed)');
}
function showPanel(category) {