Skip to content

Build your personal knowledge base with Trilium Notes

ui/list & grid view: use background effects

Adorian Doran25e67f62d5f4
diff --git a/apps/client/src/widgets/note_wrapper.ts b/apps/client/src/widgets/note_wrapper.ts
index fa912e25a8..10739ae81a 100644
--- a/apps/client/src/widgets/note_wrapper.ts
+++ b/apps/client/src/widgets/note_wrapper.ts
@@ -94,6 +94,11 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
"application/pdf"
]
+ const COLLECTIONS_WITH_BACKGROUND_EFFECTS = [
+ "grid",
+ "list"
+ ]
+
if (note.isOptions()) {
return true;
}
@@ -102,6 +107,10 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
return true;
}
+ if (note.type === "book" && COLLECTIONS_WITH_BACKGROUND_EFFECTS.includes(note.getLabelValue("viewType") ?? "")) {
+ return true;
+ }
+
return false;
}