From 936ad86bd5bd164d3f1d84b5baea22b7e3ecdfa8 Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 15 Oct 2024 19:20:40 +0800 Subject: [PATCH] fix: can wheel to scroll in entry preview toast, fix #953 Signed-off-by: Innei --- .../src/modules/ai/ai-daily/daily.tsx | 152 +++++++++--------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/apps/renderer/src/modules/ai/ai-daily/daily.tsx b/apps/renderer/src/modules/ai/ai-daily/daily.tsx index 077f4e3c8..cc0bba0e6 100644 --- a/apps/renderer/src/modules/ai/ai-daily/daily.tsx +++ b/apps/renderer/src/modules/ai/ai-daily/daily.tsx @@ -1,3 +1,4 @@ +import type { Variant } from "framer-motion" import { m, useAnimationControls } from "framer-motion" import type { Components } from "hast-util-to-jsx-runtime" import { useEffect, useState } from "react" @@ -276,7 +277,7 @@ const createRelatedEntryLink = (variant: "toast" | "modal") => (props: LinkProps const EntryToastPreview = ({ entryId }: { entryId: string }) => { useAuthQuery(Queries.entries.byId(entryId)) - const variants = { + const variants: Record = { enter: { x: 0, opacity: 1, @@ -306,89 +307,88 @@ const EntryToastPreview = ({ entryId }: { entryId: string }) => { if (!isDisplay) return null return ( - <> - -
- -
-
- {entry.entries.author} - · - - - -
+ +
+ +
+
+ {entry.entries.author} + · + + + +
+
-
- {entry.entries.description} + {entry.entries.description} - {!!entry.entries.media?.length && ( -
- {entry.entries.media.map((media, i, mediaList) => ( - { - e.stopPropagation() - previewMedia(mediaList, i) - }} - /> - ))} -
- )} -
- {!!entry.collections && } + {!!entry.entries.media?.length && ( +
+ {entry.entries.media.map((media, i, mediaList) => ( + { + e.stopPropagation() + previewMedia(mediaList, i) + }} + /> + ))} +
+ )}
- - {/* End right column */} + {!!entry.collections && }
+ + {/* End right column */}
- - +
+
) }