From df62dc87b2126d8a5818eb979df9f145eb96889a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 16 Jan 2026 11:47:42 +0200 Subject: [PATCH] feat(notes): add default icon for PDFs --- packages/commons/src/lib/notes.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/commons/src/lib/notes.ts b/packages/commons/src/lib/notes.ts index 315744dd5..6be531b5e 100644 --- a/packages/commons/src/lib/notes.ts +++ b/packages/commons/src/lib/notes.ts @@ -24,6 +24,10 @@ export const NOTE_TYPE_ICONS = { aiChat: "bx bx-bot" }; +const FILE_MIME_MAPPINGS = { + "application/pdf": "bx bxs-file-pdf", +}; + export function getNoteIcon({ noteId, type, mime, iconClass, workspaceIconClass, isFolder }: { noteId: string; type: NoteType; @@ -49,6 +53,8 @@ export function getNoteIcon({ noteId, type, mime, iconClass, workspaceIconClass, } else if (type === "code") { const correspondingMimeType = MIME_TYPES_DICT.find(m => m.mime === mime); return correspondingMimeType?.icon ?? NOTE_TYPE_ICONS.code; + } else if (type === "file") { + return FILE_MIME_MAPPINGS[mime] ?? NOTE_TYPE_ICONS.file; } return NOTE_TYPE_ICONS[type]; }