From 0d79392cde4c282cbc3faf69fd697b3726638279 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 30 Aug 2024 23:01:29 +0800 Subject: [PATCH 01/60] fix: new invitation button zindex Signed-off-by: Innei --- src/renderer/src/modules/settings/tabs/invitations.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/modules/settings/tabs/invitations.tsx b/src/renderer/src/modules/settings/tabs/invitations.tsx index c54d19d565..39596bc3e3 100644 --- a/src/renderer/src/modules/settings/tabs/invitations.tsx +++ b/src/renderer/src/modules/settings/tabs/invitations.tsx @@ -46,20 +46,20 @@ export const SettingInvitations = () => {
- + { newInvitation.mutate() }} - className="center absolute bottom-0 right-2 size-10 rounded-full bg-accent text-white drop-shadow" + className="center absolute bottom-0 right-2 z-10 size-10 rounded-full bg-accent text-white drop-shadow" > - new invitation + New invitation From 9c66b33887126287d9f6f5a39f85f76818e28f1f Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 31 Aug 2024 11:55:59 +0800 Subject: [PATCH 02/60] fix: hide peek modal toc Signed-off-by: Innei --- src/renderer/src/components/ui/modal/inspire/PeekModal.tsx | 5 ++++- src/renderer/src/modules/entry-content/index.tsx | 5 ++++- src/renderer/src/modules/entry-content/loading.tsx | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/ui/modal/inspire/PeekModal.tsx b/src/renderer/src/components/ui/modal/inspire/PeekModal.tsx index c5a4cbc1a7..fcb0e445bb 100644 --- a/src/renderer/src/components/ui/modal/inspire/PeekModal.tsx +++ b/src/renderer/src/components/ui/modal/inspire/PeekModal.tsx @@ -1,10 +1,13 @@ import { m } from "framer-motion" import type { PropsWithChildren } from "react" +import { createContext, useContext } from "react" import { Link } from "react-router-dom" import { microReboundPreset } from "../../constants/spring" import { useModalStack } from "../stacked" +const InPeekModal = createContext(false) +export const useInPeekModal = () => useContext(InPeekModal) export const PeekModal = ( props: PropsWithChildren<{ to: string @@ -22,7 +25,7 @@ export const PeekModal = ( transition={microReboundPreset} className="scrollbar-none" > - {children} + {children} = ({ useEffect(() => { scrollerRef.current?.scrollTo(0, 0) }, [entryId]) + + const isPeekModal = useInPeekModal() if (!entry) return null const content = entry?.entries.content ?? data?.entries.content @@ -233,7 +236,7 @@ export const EntryContentRender: Component<{ entryId: string }> = ({ {!isInReadabilityMode ? ( } + accessory={isPeekModal ? undefined : } as="article" className="prose dark:prose-invert prose-h1:text-[1.6em]" renderInlineStyle={readerRenderInlineStyle} diff --git a/src/renderer/src/modules/entry-content/loading.tsx b/src/renderer/src/modules/entry-content/loading.tsx index 559704ac11..9b8d8e9e0b 100644 --- a/src/renderer/src/modules/entry-content/loading.tsx +++ b/src/renderer/src/modules/entry-content/loading.tsx @@ -15,7 +15,7 @@ export const EntryContentLoading = (props: { icon?: string }) => { ) } return ( -
+
From d4581dbb194255155be2fe52829d35745d5b79ad Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 31 Aug 2024 12:08:50 +0800 Subject: [PATCH 03/60] chore: some ui improve Signed-off-by: Innei --- .../src/modules/settings/modules/fonts.tsx | 4 +- .../src/modules/settings/tabs/apperance.tsx | 5 +- .../src/modules/settings/tabs/invitations.tsx | 86 ++++++++++++------- 3 files changed, 60 insertions(+), 35 deletions(-) diff --git a/src/renderer/src/modules/settings/modules/fonts.tsx b/src/renderer/src/modules/settings/modules/fonts.tsx index 04cf40a341..744dba70f3 100644 --- a/src/renderer/src/modules/settings/modules/fonts.tsx +++ b/src/renderer/src/modules/settings/modules/fonts.tsx @@ -82,7 +82,7 @@ export const ContentFontSelector = () => { - + {isCustomFont && ( {readerFontFamily} )} @@ -127,7 +127,7 @@ export const UIFontSelector = () => { - + {isCustomFont && {uiFont}} {DEFAULT_FONT} {data.map(({ label, value }) => ( diff --git a/src/renderer/src/modules/settings/tabs/apperance.tsx b/src/renderer/src/modules/settings/tabs/apperance.tsx index 37002f3d12..da40527a3b 100644 --- a/src/renderer/src/modules/settings/tabs/apperance.tsx +++ b/src/renderer/src/modules/settings/tabs/apperance.tsx @@ -107,6 +107,7 @@ const ShikiTheme = () => {
Code highlight theme