Add project labels feature similar to Gmail labels

Features:
- Create and manage labels with customizable colors (18 color options)
- Assign multiple labels to projects via Project Details dialog
- Display settings in Preferences (only shown when labels exist):
  - Colored folder icons: Show project folder icons in label color
  - Group by label: Organize sidebar projects into collapsible groups
- Labels work alongside existing favorites (starred) system:
  - Favorites still sort to top within label groups
  - Star indicator remains visible in all display modes
- Collapsible label groups in sidebar (state persists)
- Unlabeled projects shown at bottom when grouping is enabled
- No UI changes for users without labels (settings hidden until first label)

Technical:
- useLabels hook: Manage labels CRUD and display settings
- useProjectLabels hook: Manage project-label assignments
- LabelSelector component: Assign labels to projects
- LabelsManageDialog: Create, edit, delete labels
- Full i18n support for EN, PT, ZH, HA, YO, IG
This commit is contained in:
MK Fain committed 2025-12-03 13:25:35 -06:00
1 parent a2ffc7bf9c
commit 63d23f5510
14 files changed
+1009 -11

No files matched your search

+11
View File
@@ -36,10 +36,12 @@ import {
DollarSign,
ExternalLink,
FileCode,
Tag,
} from 'lucide-react';
import JSZip from 'jszip';
import { Separator } from './ui/separator';
import { DotAI } from '@/lib/DotAI';
import { LabelSelector } from '@/components/labels/LabelSelector';
interface ProjectDetailsDialogProps {
project: Project;
@@ -283,6 +285,15 @@ export function ProjectDetailsDialog({ project, open, onOpenChange, onProjectDel
</div>
)}
{/* Labels */}
<div className="space-y-2">
<Label className="flex items-center gap-2">
<Tag className="h-4 w-4 text-muted-foreground" />
Labels
</Label>
<LabelSelector projectId={project.id} />
</div>
{/* Project Name */}
<div className="space-y-2">
<Label htmlFor="project-name">Project Name</Label>