feat: move hideExtraBadge
This commit is contained in:
parent
73d2c30416
commit
2f14c30307
|
|
@ -79,7 +79,7 @@ export const GridItemFooter = ({
|
|||
<div className="flex items-center gap-1 truncate text-[13px]">
|
||||
<FeedIcon fallback className="mr-0.5 flex" feed={feeds!} entry={entry.entries} size={18} />
|
||||
<span className={cn("min-w-0 truncate", descriptionClassName)}>
|
||||
<FeedTitle feed={feeds!} />
|
||||
<FeedTitle feed={feeds} />
|
||||
</span>
|
||||
<span className={cn("text-zinc-500", timeClassName)}>·</span>
|
||||
<span className={cn("text-zinc-500", timeClassName)}>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import { memo, useCallback, useState } from "react"
|
|||
import { useTranslation } from "react-i18next"
|
||||
|
||||
import { getMainContainerElement } from "~/atoms/dom"
|
||||
import { useUISettingKey } from "~/atoms/settings/ui"
|
||||
import { useFeedActions, useInboxActions, useListActions } from "~/hooks/biz/useFeedActions"
|
||||
import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry"
|
||||
import { useRouteParamsSelector } from "~/hooks/biz/useRouteParams"
|
||||
|
|
@ -94,7 +93,6 @@ const FeedItemImpl = ({ view, feedId, className }: FeedItemProps) => {
|
|||
useAnyPointDown(() => {
|
||||
isContextMenuOpen && setIsContextMenuOpen(false)
|
||||
})
|
||||
const hideExtraBadge = useUISettingKey("hideExtraBadge")
|
||||
if (!feed) return null
|
||||
|
||||
const isFeed = feed.type === "feed" || !feed.type
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import type { FeedOrListRespModel } from "@follow/models/types"
|
||||
import { cn } from "@follow/utils/utils"
|
||||
|
||||
import { useUISettingKey } from "~/atoms/settings/ui"
|
||||
import { BoostCertification } from "~/modules/boost/boost-certification"
|
||||
import { FeedCertification } from "~/modules/feed/feed-certification"
|
||||
import { getPreferredTitle } from "~/store/feed/store"
|
||||
|
|
@ -10,15 +11,23 @@ export const FeedTitle = ({
|
|||
className,
|
||||
title,
|
||||
}: {
|
||||
feed: FeedOrListRespModel
|
||||
feed: FeedOrListRespModel | null
|
||||
className?: string
|
||||
title?: string | null
|
||||
}) => {
|
||||
const hideExtraBadge = useUISettingKey("hideExtraBadge")
|
||||
|
||||
if (!feed) return null
|
||||
|
||||
return (
|
||||
<div className={cn("flex items-center truncate", className)}>
|
||||
<div className="truncate">{title || getPreferredTitle(feed)}</div>
|
||||
<FeedCertification feed={feed} />
|
||||
<BoostCertification feed={feed} />
|
||||
{!hideExtraBadge && (
|
||||
<>
|
||||
<FeedCertification feed={feed} />
|
||||
<BoostCertification feed={feed} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue