From bcb40b531f718b7d2e52977ba88a80464263ee6d Mon Sep 17 00:00:00 2001 From: "Romain DEP." Date: Mon, 17 Feb 2025 22:20:20 +0100 Subject: [PATCH] feat(view/calendar): support coloring --- src/public/app/widgets/view_widgets/calendar_view.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/view_widgets/calendar_view.ts b/src/public/app/widgets/view_widgets/calendar_view.ts index 70b68e98f..fc1d2595f 100644 --- a/src/public/app/widgets/view_widgets/calendar_view.ts +++ b/src/public/app/widgets/view_widgets/calendar_view.ts @@ -192,6 +192,7 @@ export default class CalendarView extends ViewMode { for (const note of notes) { const startDate = note.getAttributeValue("label", "startDate"); const customTitle = note.getAttributeValue("label", "calendar:title"); + const color = note.getAttributeValue("label", "calendar:color") ?? note.getAttributeValue("label", "color") ?? undefined; if (!startDate) { continue; @@ -203,7 +204,8 @@ export default class CalendarView extends ViewMode { title: title, start: startDate, url: `#${note.noteId}`, - noteId: note.noteId + noteId: note.noteId, + color: color, }; const endDate = CalendarView.#offsetDate(note.getAttributeValue("label", "endDate") ?? startDate, 1);