fix: hover bg area
This commit is contained in:
@@ -14,7 +14,7 @@ export function ArticleItem({ entryId, entryPreview }: UniversalItemProps) {
|
||||
if (!entry) return <ReactVirtuosoItemPlaceholder />
|
||||
|
||||
return (
|
||||
<div className="pb-8 flex px-2 pt-3">
|
||||
<div className="py-3 flex px-2">
|
||||
<FeedIcon feed={entry.feeds} />
|
||||
<div className="-mt-0.5 line-clamp-5 flex-1 text-sm leading-tight">
|
||||
<div className={cn("flex gap-1 text-[10px] font-bold", entry.read ? "text-zinc-400" : "text-zinc-500")}>
|
||||
|
||||
@@ -45,38 +45,39 @@ export function EntryItemWrapper({
|
||||
if (!entry) return <ReactVirtuosoItemPlaceholder />
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"rounded-md bg-white transition-colors",
|
||||
!views[view || 0].wideMode && activeEntry === entry.entries.id && "bg-native-active/40",
|
||||
views[view || 0].wideMode && !views[view || 0].gridMode && "hover:bg-native-active/30",
|
||||
entry.read ? "text-zinc-500/90" : "text-zinc-900 dark:text-white/90",
|
||||
)}
|
||||
// ref={ref}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
feedActions.setActiveEntry(entry.entries.id)
|
||||
if (!entry.read) {
|
||||
read.mutate()
|
||||
}
|
||||
}}
|
||||
onDoubleClick={() =>
|
||||
entry.entries.url && window.open(entry.entries.url, "_blank")}
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault()
|
||||
showNativeMenu(
|
||||
items
|
||||
.filter((item) => !item.disabled)
|
||||
.map((item) => ({
|
||||
type: "text",
|
||||
label: item.name,
|
||||
click: item.onClick,
|
||||
})),
|
||||
e,
|
||||
)
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
<div className={cn(!views[view || 0].wideMode && "pb-3")}>
|
||||
<div
|
||||
className={cn(
|
||||
"rounded-md bg-white transition-colors",
|
||||
!views[view || 0].wideMode && activeEntry === entry.entries.id && "bg-native-active/40",
|
||||
entry.read ? "text-zinc-500/90" : "text-zinc-900 dark:text-white/90",
|
||||
)}
|
||||
// ref={ref}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
feedActions.setActiveEntry(entry.entries.id)
|
||||
if (!entry.read) {
|
||||
read.mutate()
|
||||
}
|
||||
}}
|
||||
onDoubleClick={() =>
|
||||
entry.entries.url && window.open(entry.entries.url, "_blank")}
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault()
|
||||
showNativeMenu(
|
||||
items
|
||||
.filter((item) => !item.disabled)
|
||||
.map((item) => ({
|
||||
type: "text",
|
||||
label: item.name,
|
||||
click: item.onClick,
|
||||
})),
|
||||
e,
|
||||
)
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export function NotificationItem({ entryId, entryPreview }: UniversalItemProps)
|
||||
const entry = useEntry(entryId) || entryPreview
|
||||
if (!entry) return <ReactVirtuosoItemPlaceholder />
|
||||
return (
|
||||
<div className="flex px-2 pt-3 pb-8">
|
||||
<div className="flex px-2 py-5">
|
||||
<FeedIcon feed={entry.feeds} />
|
||||
<div className="-mt-0.5 line-clamp-5 flex-1 text-sm leading-tight">
|
||||
<div className="space-x-1 text-[10px] text-zinc-500">
|
||||
|
||||
@@ -12,7 +12,7 @@ export function SocialMediaItem({ entryId, entryPreview }: UniversalItemProps) {
|
||||
// NOTE: prevent 0 height element, react virtuoso will not stop render any more
|
||||
if (!entry) return <ReactVirtuosoItemPlaceholder />
|
||||
return (
|
||||
<div className="flex w-full px-2 pt-3 pb-8">
|
||||
<div className="flex w-full px-2 py-3">
|
||||
<FeedIcon feed={entry.feeds} />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="-mt-0.5 line-clamp-5 flex-1 text-sm">
|
||||
|
||||
Reference in New Issue
Block a user