mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
feat(ui): add unified sidebar component
Add new unified-sidebar component for layout improvements. - Export UnifiedSidebar from layout components - Update root route to use new sidebar structure
This commit is contained in:
@@ -3,8 +3,7 @@ import { useEffect, useState, useCallback, useDeferredValue, useRef } from 'reac
|
||||
import { QueryClientProvider } from '@tanstack/react-query';
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||
import { createLogger } from '@automaker/utils/logger';
|
||||
import { Sidebar } from '@/components/layout/sidebar';
|
||||
import { ProjectSwitcher } from '@/components/layout/project-switcher';
|
||||
import { UnifiedSidebar } from '@/components/layout/unified-sidebar';
|
||||
import {
|
||||
FileBrowserProvider,
|
||||
useFileBrowser,
|
||||
@@ -171,8 +170,6 @@ function RootLayoutContent() {
|
||||
skipSandboxWarning,
|
||||
setSkipSandboxWarning,
|
||||
fetchCodexModels,
|
||||
sidebarOpen,
|
||||
toggleSidebar,
|
||||
} = useAppStore();
|
||||
const { setupComplete, codexCliStatus } = useSetupStore();
|
||||
const navigate = useNavigate();
|
||||
@@ -186,7 +183,7 @@ function RootLayoutContent() {
|
||||
// Load project settings when switching projects
|
||||
useProjectSettingsLoader();
|
||||
|
||||
// Check if we're in compact mode (< 1240px) to hide project switcher
|
||||
// Check if we're in compact mode (< 1240px)
|
||||
const isCompact = useIsCompact();
|
||||
|
||||
const isSetupRoute = location.pathname === '/setup';
|
||||
@@ -853,11 +850,6 @@ function RootLayoutContent() {
|
||||
);
|
||||
}
|
||||
|
||||
// Show project switcher on all app pages (not on dashboard, setup, or login)
|
||||
// Also hide on compact screens (< 1240px) - the sidebar will show a logo instead
|
||||
const showProjectSwitcher =
|
||||
!isDashboardRoute && !isSetupRoute && !isLoginRoute && !isLoggedOutRoute && !isCompact;
|
||||
|
||||
return (
|
||||
<>
|
||||
<main className="flex h-screen overflow-hidden" data-testid="app-container">
|
||||
@@ -868,8 +860,7 @@ function RootLayoutContent() {
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)}
|
||||
{showProjectSwitcher && <ProjectSwitcher />}
|
||||
<Sidebar />
|
||||
<UnifiedSidebar />
|
||||
<div
|
||||
className="flex-1 flex flex-col overflow-hidden transition-all duration-300"
|
||||
style={{ marginRight: streamerPanelOpen ? '250px' : '0' }}
|
||||
|
||||
Reference in New Issue
Block a user