mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
feat: Add Discord-like project switcher sidebar with icon support
- Add project icon field to ProjectRef and Project types - Create vertical project switcher sidebar component - Project icons with hover tooltips - Active project highlighting - Plus button to create new projects - Right-click context menu for edit/delete - Add IconPicker component with 35+ Lucide icons - Add EditProjectDialog for inline project editing - Update settings appearance section with project details editor - Add setProjectIcon and setProjectName actions to app store - Integrate ProjectSwitcher in root layout (shows on app pages only) Implements #469 Co-authored-by: Web Dev Cody <webdevcody@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { createRootRoute, Outlet, useLocation, useNavigate } from '@tanstack/rea
|
||||
import { useEffect, useState, useCallback, useDeferredValue, useRef } from 'react';
|
||||
import { createLogger } from '@automaker/utils/logger';
|
||||
import { Sidebar } from '@/components/layout/sidebar';
|
||||
import { ProjectSwitcher } from '@/components/layout/project-switcher';
|
||||
import {
|
||||
FileBrowserProvider,
|
||||
useFileBrowser,
|
||||
@@ -803,6 +804,10 @@ function RootLayoutContent() {
|
||||
);
|
||||
}
|
||||
|
||||
// Show project switcher on all app pages (not on dashboard, setup, or login)
|
||||
const showProjectSwitcher =
|
||||
!isDashboardRoute && !isSetupRoute && !isLoginRoute && !isLoggedOutRoute;
|
||||
|
||||
return (
|
||||
<>
|
||||
<main className="flex h-screen overflow-hidden" data-testid="app-container">
|
||||
@@ -813,6 +818,7 @@ function RootLayoutContent() {
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)}
|
||||
{showProjectSwitcher && <ProjectSwitcher />}
|
||||
<Sidebar />
|
||||
{/* Mobile menu toggle button - only shows when sidebar is closed on mobile */}
|
||||
{!sidebarOpen && (
|
||||
|
||||
Reference in New Issue
Block a user