@@ -88,13 +88,14 @@ export function FeedIcon({
|
||||
{
|
||||
"width": size,
|
||||
"height": size,
|
||||
"lineHeight": `${size}px`,
|
||||
|
||||
"--fo-light-background": colors.light.background,
|
||||
"--fo-dark-background": colors.dark.background,
|
||||
} as any
|
||||
}
|
||||
className={cn(
|
||||
"mr-2 flex shrink-0 items-baseline justify-center rounded-sm text-xs font-medium",
|
||||
"mr-2 flex shrink-0 justify-center rounded-sm text-xs font-medium",
|
||||
"bg-[var(--fo-light-background)] text-white dark:bg-[var(--fo-dark-background)] dark:text-black",
|
||||
className,
|
||||
)}
|
||||
|
||||
@@ -199,9 +199,7 @@ const MediaImpl: FC<MediaProps> = ({
|
||||
type,
|
||||
])
|
||||
|
||||
if (hidden) {
|
||||
if (showFallback) { return <FallbackMedia {...props} /> } else { return null }
|
||||
}
|
||||
if (hidden && showFallback) { return <FallbackMedia {...props} /> }
|
||||
return (
|
||||
<div className={cn("overflow-hidden rounded", className)} style={style}>
|
||||
{InnerContent}
|
||||
|
||||
@@ -98,9 +98,11 @@ export const useUnread = () =>
|
||||
export const useEntryActions = ({
|
||||
view,
|
||||
entry,
|
||||
type,
|
||||
}: {
|
||||
view?: number
|
||||
entry?: FlatEntryModel | null
|
||||
type?: "toolbar" | "entryList"
|
||||
}) => {
|
||||
const checkEagle = useQuery({
|
||||
queryKey: ["check-eagle"],
|
||||
@@ -221,7 +223,7 @@ export const useEntryActions = ({
|
||||
"",
|
||||
),
|
||||
key: "readability",
|
||||
hide:
|
||||
hide: type === "entryList" ||
|
||||
views[view].wideMode ||
|
||||
!populatedEntry.entries.url ||
|
||||
!window.electron,
|
||||
|
||||
@@ -117,6 +117,7 @@ const ActionBar = ({ entryId }: { entryId: string }) => {
|
||||
const { items } = useEntryActions({
|
||||
entry,
|
||||
view,
|
||||
type: "toolbar",
|
||||
})
|
||||
return (
|
||||
<div className="flex origin-right scale-90 items-center gap-1">
|
||||
|
||||
@@ -25,6 +25,7 @@ export const EntryItemWrapper: FC<
|
||||
const { items } = useEntryActions({
|
||||
view,
|
||||
entry,
|
||||
type: "entryList",
|
||||
})
|
||||
|
||||
const { items: feedItems } = useFeedActions({
|
||||
|
||||
@@ -23,6 +23,7 @@ export function EntryHeader({
|
||||
const { items } = useEntryActions({
|
||||
view,
|
||||
entry,
|
||||
type: "toolbar",
|
||||
})
|
||||
|
||||
const entryTitleMeta = useEntryTitleMeta()
|
||||
@@ -76,9 +77,7 @@ export function EntryHeader({
|
||||
<ActionButton
|
||||
icon={
|
||||
item.icon ? (
|
||||
<Slot className="size-4">
|
||||
{item.icon}
|
||||
</Slot>
|
||||
<Slot className="size-4">{item.icon}</Slot>
|
||||
) : (
|
||||
<i className={item.className} />
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user