fix: hide action bar in header for wide view
This commit is contained in:
parent
eb97dda359
commit
f11bf3b77f
|
|
@ -1,10 +1,11 @@
|
|||
import { FeedViewType, views } from "@follow/constants"
|
||||
import { views } from "@follow/constants"
|
||||
import { useEntry } from "@follow/store/entry/hooks"
|
||||
import { cn } from "@follow/utils/utils"
|
||||
import { AnimatePresence, m } from "motion/react"
|
||||
import { memo } from "react"
|
||||
|
||||
import { useUISettingKey } from "~/atoms/settings/ui"
|
||||
import { useFeature } from "~/hooks/biz/useFeature"
|
||||
|
||||
import { EntryHeaderActions } from "../../actions/header-actions"
|
||||
import { MoreActions } from "../../actions/more-actions"
|
||||
|
|
@ -21,6 +22,9 @@ function EntryHeaderImpl({ view, entryId, className, compact }: EntryHeaderProps
|
|||
|
||||
const shouldShowMeta = !isAtTop && !!entryTitleMeta?.title
|
||||
|
||||
const aiEnabled = useFeature("ai")
|
||||
const isWide = views[view]?.wideMode || aiEnabled
|
||||
|
||||
if (!entry) return null
|
||||
|
||||
return (
|
||||
|
|
@ -69,7 +73,7 @@ function EntryHeaderImpl({ view, entryId, className, compact }: EntryHeaderProps
|
|||
</AnimatePresence>
|
||||
</div>
|
||||
|
||||
{view !== FeedViewType.SocialMedia && (
|
||||
{!isWide && (
|
||||
<div className="relative flex shrink-0 items-center justify-end gap-2">
|
||||
<EntryHeaderActions entryId={entryId} view={view} compact={compact} />
|
||||
<MoreActions entryId={entryId} view={view} />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import type { FeedViewType } from "@follow/constants"
|
||||
|
||||
export interface EntryHeaderProps {
|
||||
view: number
|
||||
view: FeedViewType
|
||||
entryId: string
|
||||
className?: string
|
||||
compact?: boolean
|
||||
|
|
|
|||
Loading…
Reference in New Issue