From d9b4f7345b8ad682e0f9fd309f3a2240a26fc457 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 17 Oct 2025 09:34:40 +0300 Subject: [PATCH] feat(collection/presentation): support gradients as well --- apps/client/src/widgets/collections/presentation/index.tsx | 1 + apps/client/src/widgets/collections/presentation/model.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/collections/presentation/index.tsx b/apps/client/src/widgets/collections/presentation/index.tsx index d9fabff10..119d4e7b0 100644 --- a/apps/client/src/widgets/collections/presentation/index.tsx +++ b/apps/client/src/widgets/collections/presentation/index.tsx @@ -178,6 +178,7 @@ function Slide({ slide }: { slide: PresentationSlideBaseModel }) {
); diff --git a/apps/client/src/widgets/collections/presentation/model.ts b/apps/client/src/widgets/collections/presentation/model.ts index b0b4aa12c..a0a125975 100644 --- a/apps/client/src/widgets/collections/presentation/model.ts +++ b/apps/client/src/widgets/collections/presentation/model.ts @@ -13,6 +13,7 @@ export interface PresentationSlideBaseModel { noteId: string; content: DangerouslySetInnerHTML; backgroundColor?: string; + backgroundGradient?: string; } export interface PresentationModel { @@ -39,10 +40,14 @@ async function buildVerticalSlides(parentSlideNote: FNote): Promise { + const slideBackground = note.getLabelValue("slide:background") ?? undefined; + const isGradient = slideBackground?.includes("gradient("); + return { noteId: note.noteId, content: await processContent(note), - backgroundColor: note.getLabelValue("slide:background") ?? undefined + backgroundColor: !isGradient ? slideBackground : undefined, + backgroundGradient: isGradient ? slideBackground : undefined } }