From c9fae88a86caec99112f6c07ebf187d98f44c4f8 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Wed, 17 Dec 2025 22:48:47 +0200 Subject: [PATCH] style/note: add custom note color CSS variables on the split containers --- apps/client/src/widgets/note_wrapper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/note_wrapper.ts b/apps/client/src/widgets/note_wrapper.ts index d743d9ffa..9eaed96c7 100644 --- a/apps/client/src/widgets/note_wrapper.ts +++ b/apps/client/src/widgets/note_wrapper.ts @@ -63,6 +63,7 @@ export default class NoteWrapperWidget extends FlexContainer { this.$widget.addClass(utils.getNoteTypeClass(note.type)); this.$widget.addClass(utils.getMimeTypeClass(note.mime)); this.$widget.addClass(`view-mode-${this.noteContext?.viewScope?.viewMode ?? "default"}`); + this.$widget.addClass(note.getColorClass()); this.$widget.toggleClass(["bgfx", "options"], note.isOptions()); this.$widget.toggleClass("protected", note.isProtected); @@ -93,7 +94,7 @@ export default class NoteWrapperWidget extends FlexContainer { const noteId = this.noteContext?.noteId; if ( loadResults.isNoteReloaded(noteId) || - loadResults.getAttributeRows().find((attr) => attr.type === "label" && ["cssClass", "language", "viewType"].includes(attr.name ?? "") && attributeService.isAffecting(attr, this.noteContext?.note)) + loadResults.getAttributeRows().find((attr) => attr.type === "label" && ["cssClass", "language", "viewType", "color"].includes(attr.name ?? "") && attributeService.isAffecting(attr, this.noteContext?.note)) ) { this.refresh(); }