diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 8c72afc..47a3f1f 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -55,7 +55,8 @@ "mcp__web-search-prime__webSearchPrime", "mcp__context7__query-docs", "Bash(docker logs:*)", - "Bash(docker run:*)" + "Bash(docker run:*)", + "Bash(docker exec:*)" ] } } diff --git a/keep-notes/components/note-card.tsx b/keep-notes/components/note-card.tsx index 8da1bac..b8c8720 100644 --- a/keep-notes/components/note-card.tsx +++ b/keep-notes/components/note-card.tsx @@ -10,7 +10,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' -import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote } from 'lucide-react' +import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote, LucideIcon, Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2 } from 'lucide-react' import { useState, useEffect, useTransition, useOptimistic } from 'react' import { useSession } from 'next-auth/react' import { useRouter, useSearchParams } from 'next/navigation' @@ -56,6 +56,28 @@ function getDateLocale(language: string): Locale { return localeMap[language] || dateFnsLocales.enUS } +// Map icon names to lucide-react components +const ICON_MAP: Record = { + 'folder': Folder, + 'briefcase': Briefcase, + 'document': FileText, + 'lightning': Zap, + 'chart': BarChart3, + 'globe': Globe, + 'sparkle': Sparkles, + 'book': Book, + 'heart': Heart, + 'crown': Crown, + 'music': Music, + 'building': Building2, +} + +// Function to get icon component by name +function getNotebookIcon(iconName: string): LucideIcon { + const IconComponent = ICON_MAP[iconName] || Folder + return IconComponent +} + interface NoteCardProps { note: Note onEdit?: (note: Note, readOnly?: boolean) => void @@ -278,15 +300,18 @@ export function NoteCard({ note, onEdit, isDragging, isDragOver, onDragStart, on {t('notebookSuggestion.generalNotes')} - {notebooks.map((notebook: any) => ( - handleMoveToNotebook(notebook.id)} - > - {notebook.icon || '📁'} - {notebook.name} - - ))} + {notebooks.map((notebook: any) => { + const NotebookIcon = getNotebookIcon(notebook.icon || 'folder') + return ( + handleMoveToNotebook(notebook.id)} + > + + {notebook.name} + + ) + })}