Skip to content

Commit

Permalink
feat: bigger font size in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Dec 12, 2024
1 parent 7c44d3d commit 3e9a92d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const MobileFloatBar = ({
>
<m.div
className={clsx(
"mx-auto inline-flex h-10 min-w-0 items-center rounded-full border border-neutral-200 bg-background pl-4 pr-2 shadow-sm shadow-zinc-100 dark:border-neutral-800",
"mx-1 inline-flex h-10 w-full min-w-0 items-center rounded-full border border-neutral-200 bg-background pl-4 pr-2 shadow-sm shadow-zinc-100 dark:border-neutral-800",
"[box-shadow:0px_8px_30px_rgba(122,122,122,0.2)] dark:[box-shadow:0px_8px_30px_rgba(122,122,122,0.2)]",
"pointer-events-auto",
)}
Expand Down
4 changes: 3 additions & 1 deletion apps/renderer/src/providers/setting-sync.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isMobile } from "@follow/components/hooks/useMobile.js"
import i18next from "i18next"
import { useEffect, useInsertionEffect, useLayoutEffect } from "react"

Expand All @@ -13,10 +14,11 @@ import { feedUnreadActions } from "~/store/unread"

const useUISettingSync = () => {
const setting = useUISettingValue()
const mobile = isMobile()
useSyncTheme()
useInsertionEffect(() => {
const root = document.documentElement
root.style.fontSize = `${setting.uiTextSize}px`
root.style.fontSize = `${setting.uiTextSize * (mobile ? 1.125 : 1)}px`
}, [setting.uiTextSize])

useInsertionEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ui/divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const DividerVertical: FC<
return (
<span
className={cn(
"mx-4 inline-block h-full w-[0.5px] select-none bg-black text-transparent !opacity-20 dark:bg-white",
"mx-3 inline-block h-full w-[0.5px] select-none bg-black text-transparent !opacity-20 dark:bg-white",
className,
)}
{...rest}
Expand Down

0 comments on commit 3e9a92d

Please sign in to comment.