Fix: Prevent main content shift when desktop navbar is not persistent
This commit addresses an issue where the main content area would shift to the right on desktop when the sidebar was opened, regardless of the `desktopNavbarPersistent` setting. The layout logic in `App.vue` has been updated so that the `md:pl-60` class (which adds left padding to the main content area) is now applied only when both `ui.sidebarOpen` and `ui.desktopNavbarPersistent` are true. This ensures that: - If `desktopNavbarPersistent` is true, the sidebar will take up dedicated space, and the content will correctly shift. - If `desktopNavbarPersistent` is false, the sidebar will overlay the content on desktop, and the main content will no longer shift.
This commit is contained in:
@@ -64,7 +64,7 @@ const transitionDurationStyle = computed(() => {
|
|||||||
<!-- wrapper: deja espacio para TopBar (pt-14 = 56px) y, en desktop, para NavBar (pl-60) -->
|
<!-- wrapper: deja espacio para TopBar (pt-14 = 56px) y, en desktop, para NavBar (pl-60) -->
|
||||||
<div :class="[
|
<div :class="[
|
||||||
'pt-14 min-h-screen transition-[padding-left] duration-200',
|
'pt-14 min-h-screen transition-[padding-left] duration-200',
|
||||||
ui.sidebarOpen ? 'md:pl-60' : '',
|
(ui.sidebarOpen && ui.desktopNavbarPersistent) ? 'md:pl-60' : '',
|
||||||
// The global style.css will handle base background and text color via body styling
|
// The global style.css will handle base background and text color via body styling
|
||||||
// but we can keep specific overrides here if needed or theme classes.
|
// but we can keep specific overrides here if needed or theme classes.
|
||||||
// ui.theme === 'dark' ? 'bg-gray-800 text-gray-100' : 'bg-gray-100 text-gray-900'
|
// ui.theme === 'dark' ? 'bg-gray-800 text-gray-100' : 'bg-gray-100 text-gray-900'
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export const useRealtimeStore = defineStore('realtime', {
|
|||||||
this._sse.onerror = () => {
|
this._sse.onerror = () => {
|
||||||
console.warn('SSE connection lost, reloading...');
|
console.warn('SSE connection lost, reloading...');
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
clearBadgesForTable(table) {
|
clearBadgesForTable(table) {
|
||||||
if (this.badges[table]) {
|
if (this.badges[table]) {
|
||||||
this.badges[table].INSERT = false;
|
this.badges[table].INSERT = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user