feat(webui): add reading text size preferences (#6325)

* feat(webui): add reading text size preferences

* fix(webui): align loading skeletons with reading typography
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-20 16:33:05 +08:00
1 parent 816c9221a0
commit 282839cc65
48 files changed
+662 -120

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { useLayoutEffect } from "react";
import { useLocalPreferences } from "@/hooks/useLocalPreferences";
/** Project browser preferences onto text tokens, without scaling the UI or rem. */
export function useReadingTypography(): void {
const { readingTextSize } = useLocalPreferences();
useLayoutEffect(() => {
document.documentElement.dataset.readingTextSize = readingTextSize;
}, [readingTextSize]);
}