mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-11 01:55:43 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user