From ebc77002d2e2f2c1cab9e3c9be6332947228ad36 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Tue, 17 Feb 2026 18:17:21 +0100 Subject: [PATCH] feat: use dynamic type colors for selected note in NoteList The selected note's border-left and background now reflect the note's type color instead of hardcoded blue. Co-Authored-By: Claude Opus 4.6 --- src/components/NoteList.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/NoteList.tsx b/src/components/NoteList.tsx index 466f065f..74e824bf 100644 --- a/src/components/NoteList.tsx +++ b/src/components/NoteList.tsx @@ -4,6 +4,7 @@ import type { VaultEntry, SidebarSelection, ModifiedFile } from '../types' import { cn } from '@/lib/utils' import { Input } from '@/components/ui/input' import { MagnifyingGlass, Plus } from '@phosphor-icons/react' +import { getTypeColor, getTypeLightColor } from '../utils/typeColors' interface NoteListProps { entries: VaultEntry[] @@ -207,17 +208,23 @@ function NoteListInner({ entries, selection, selectedNote, modifiedFiles, onSele const renderItem = useCallback((entry: VaultEntry, isPinned = false) => { const isSelected = selectedNote?.path === entry.path && !isPinned + const typeColor = getTypeColor(entry.isA) + const typeLightColor = getTypeLightColor(entry.isA) return (
onSelectNote(entry)} >