mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
feat: foldable PROJECTS section in sidebar with color support
- Add `color` (text) and `archivedAt` (timestamp) columns to projects table - Add PROJECT_COLORS palette constant (10 colors) in shared package - Add color/archivedAt to Project type interface and Zod validators - Auto-assign next available color from palette on project creation - New SidebarProjects component with: - Collapsible PROJECTS header above WORK section - Caret toggle visible on hover (left of header) - Always-visible plus button (right of header) opens NewProjectDialog - Lists non-archived projects with colored rounded squares - Active project highlighted based on URL match - Remove Projects nav item from WORK section in sidebar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3392f4dbfa
commit
a57d3427f7
10 changed files with 224 additions and 10 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import {
|
||||
Inbox,
|
||||
CircleDot,
|
||||
Hexagon,
|
||||
Target,
|
||||
LayoutDashboard,
|
||||
Bot,
|
||||
|
|
@ -9,7 +8,6 @@ import {
|
|||
History,
|
||||
Search,
|
||||
SquarePen,
|
||||
ShieldCheck,
|
||||
BookOpen,
|
||||
Paperclip,
|
||||
} from "lucide-react";
|
||||
|
|
@ -17,6 +15,7 @@ import { useQuery } from "@tanstack/react-query";
|
|||
import { CompanySwitcher } from "./CompanySwitcher";
|
||||
import { SidebarSection } from "./SidebarSection";
|
||||
import { SidebarNavItem } from "./SidebarNavItem";
|
||||
import { SidebarProjects } from "./SidebarProjects";
|
||||
import { useDialog } from "../context/DialogContext";
|
||||
import { useCompany } from "../context/CompanyContext";
|
||||
import { sidebarBadgesApi } from "../api/sidebarBadges";
|
||||
|
|
@ -82,20 +81,15 @@ export function Sidebar() {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<SidebarProjects />
|
||||
|
||||
<SidebarSection label="Work">
|
||||
<SidebarNavItem to="/issues" label="Issues" icon={CircleDot} />
|
||||
<SidebarNavItem to="/projects" label="Projects" icon={Hexagon} />
|
||||
<SidebarNavItem to="/goals" label="Goals" icon={Target} />
|
||||
</SidebarSection>
|
||||
|
||||
<SidebarSection label="Company">
|
||||
<SidebarNavItem to="/agents" label="Agents" icon={Bot} />
|
||||
<SidebarNavItem
|
||||
to="/approvals"
|
||||
label="Approvals"
|
||||
icon={ShieldCheck}
|
||||
badge={sidebarBadges?.approvals}
|
||||
/>
|
||||
<SidebarNavItem to="/costs" label="Costs" icon={DollarSign} />
|
||||
<SidebarNavItem to="/activity" label="Activity" icon={History} />
|
||||
</SidebarSection>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue