From 24ef65227508472b3d29f00951306d0364d6062a Mon Sep 17 00:00:00 2001 From: ochenstarik Date: Mon, 21 Sep 2026 23:43:42 +0700 Subject: [PATCH] fix: unify shell theme and responsive workspace --- src/app/layouts/AppShell.tsx | 12 ++++++++--- src/app/shell/Topbar.tsx | 16 ++++---------- .../components/MessengersView.tsx | 21 +++++++++++-------- src/index.css | 21 +++++++++++++++++++ 4 files changed, 46 insertions(+), 24 deletions(-) diff --git a/src/app/layouts/AppShell.tsx b/src/app/layouts/AppShell.tsx index 79c9965..5c8aa2e 100644 --- a/src/app/layouts/AppShell.tsx +++ b/src/app/layouts/AppShell.tsx @@ -22,7 +22,7 @@ export const AppShell: React.FC = () => { activeLocation, } = useDemoStore(); - const { isMobile, isTablet, isDesktop } = useResponsive(); + const { width, isMobile, isTablet, isDesktop } = useResponsive(); const profile = getActiveProfile(); const location = useLocation(); const isCommunicationsPage = location.pathname.startsWith('/communications'); @@ -36,7 +36,9 @@ export const AppShell: React.FC = () => { dark: 'graphite-forest-dark', }[theme]; document.documentElement.setAttribute('data-krona-theme', kronaTheme); - }, [theme]); + document.documentElement.setAttribute('data-omni-theme', kronaTheme); + document.documentElement.setAttribute('data-omni-density', isMobile ? 'touch' : 'workspace'); + }, [theme, isMobile]); // Layout resolution: // 1. Real screen size is paramount: @@ -78,7 +80,11 @@ export const AppShell: React.FC = () => { {/* Main Shell Layout */}
{/* Left Sidebar: hidden on mobile, rendered on tablet & desktop */} - {!isEffectiveMobile && } + {!isEffectiveMobile && ( + + )} {/* Center Work Area */}
diff --git a/src/app/shell/Topbar.tsx b/src/app/shell/Topbar.tsx index 84612ae..86ae73a 100644 --- a/src/app/shell/Topbar.tsx +++ b/src/app/shell/Topbar.tsx @@ -180,7 +180,7 @@ export const Topbar: React.FC = () => { {/* Location Switcher */} {profile.locations.length > 1 && ( -
+
@@ -208,7 +208,7 @@ export const Topbar: React.FC = () => { )} {/* Role Badge (RBAC) */} -
+
{/* Center: Command Search Palette Trigger */} -
+
{/* Theme switcher (3 buttons) */} @@ -352,14 +352,6 @@ export const Topbar: React.FC = () => {
- {/* Communications owns its local tabs inside the module. Keep only the - module title here so the shell does not render a duplicate menu. */} - {isCommunicationsModule && ( -
- Коммуникации -
- )} - {/* Subheader / Subtabs Navigation Bar (Desktop & Tablet) */} {!isCommunicationsModule && activeSubtabs.length > 0 && (
diff --git a/src/features/communications/components/MessengersView.tsx b/src/features/communications/components/MessengersView.tsx index 354375d..1cb8d63 100644 --- a/src/features/communications/components/MessengersView.tsx +++ b/src/features/communications/components/MessengersView.tsx @@ -696,15 +696,18 @@ export function MessengersView({ onOpenConnectModal, onOpenAddContactModal }: Me
- {onOpenConnectModal && } + {onOpenConnectModal && ( +
+ +
+ )} {onOpenConnectModal &&