feat: star icon
This commit is contained in:
@@ -6,6 +6,7 @@ import { cn } from "@renderer/lib/utils"
|
||||
import { EntryTranslation } from "@renderer/modules/entry-column/translation"
|
||||
import { useEntry } from "@renderer/store/entry/hooks"
|
||||
|
||||
import { StarIcon } from "./star-icon"
|
||||
import type { UniversalItemProps } from "./types"
|
||||
|
||||
export function GridItem({
|
||||
@@ -28,12 +29,12 @@ export function GridItem({
|
||||
<div
|
||||
className={cn(
|
||||
"relative mb-1 mt-1.5 truncate font-medium leading-none",
|
||||
!!entry.collections && "pr-4",
|
||||
!!entry.collections && "pr-5",
|
||||
)}
|
||||
>
|
||||
<EntryTranslation source={entry.entries.title} target={translation?.title} />
|
||||
{!!entry.collections && (
|
||||
<i className="i-mgc-star-cute-fi absolute right-0 top-0 text-orange-400" />
|
||||
<StarIcon />
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-1 truncate text-[13px]">
|
||||
|
||||
@@ -7,6 +7,7 @@ import { EntryTranslation } from "@renderer/modules/entry-column/translation"
|
||||
import { useEntry } from "@renderer/store/entry/hooks"
|
||||
|
||||
import { ReactVirtuosoItemPlaceholder } from "../../components/ui/placeholder"
|
||||
import { StarIcon } from "./star-icon"
|
||||
import type { UniversalItemProps } from "./types"
|
||||
|
||||
export function ListItem({
|
||||
@@ -57,7 +58,7 @@ export function ListItem({
|
||||
<div
|
||||
className={cn(
|
||||
"relative my-0.5 break-words",
|
||||
!!entry.collections && "pr-4",
|
||||
!!entry.collections && "pr-5",
|
||||
entry.entries.title ? withDetails && "font-medium" : "text-[13px]",
|
||||
)}
|
||||
>
|
||||
@@ -73,7 +74,7 @@ export function ListItem({
|
||||
/>
|
||||
)}
|
||||
{!!entry.collections && (
|
||||
<i className="i-mgc-star-cute-fi absolute right-0 top-[3px] text-orange-400" />
|
||||
<StarIcon />
|
||||
)}
|
||||
</div>
|
||||
{withDetails && (
|
||||
|
||||
@@ -6,6 +6,7 @@ import { cn } from "@renderer/lib/utils"
|
||||
import { useEntry } from "@renderer/store/entry/hooks"
|
||||
|
||||
import { ReactVirtuosoItemPlaceholder } from "../../components/ui/placeholder"
|
||||
import { StarIcon } from "./star-icon"
|
||||
import { EntryTranslation } from "./translation"
|
||||
import type { UniversalItemProps } from "./types"
|
||||
|
||||
@@ -20,7 +21,7 @@ export function SocialMediaItem({ entryId, entryPreview, translation }: Universa
|
||||
<div className={cn("relative flex w-full py-3 pl-3 pr-2", !asRead && "before:absolute before:-left-0.5 before:top-[22px] before:block before:size-2 before:rounded-full before:bg-theme-accent")}>
|
||||
<FeedIcon feed={entry.feeds} entry={entry.entries} size={28} />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="-mt-0.5 line-clamp-5 flex-1 text-sm">
|
||||
<div className={cn("-mt-0.5 flex-1 text-sm", entry.entries.description && "line-clamp-5")}>
|
||||
<div className="space-x-1">
|
||||
<span className="font-medium">{entry.entries.author}</span>
|
||||
<span className="text-zinc-500">·</span>
|
||||
@@ -33,10 +34,10 @@ export function SocialMediaItem({ entryId, entryPreview, translation }: Universa
|
||||
.humanize()}
|
||||
</span>
|
||||
</div>
|
||||
<div className={cn("relative mt-0.5", !!entry.collections && "pr-4")}>
|
||||
<div className={cn("relative mt-0.5", !!entry.collections && "pr-5")}>
|
||||
<EntryTranslation source={entry.entries.description} target={translation?.description} />
|
||||
{!!entry.collections && (
|
||||
<i className="i-mgc-star-cute-fi absolute right-0 top-1 text-orange-400" />
|
||||
<StarIcon />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export const StarIcon = () => <i className="i-mgc-star-cute-fi absolute right-0 top-0 text-base text-orange-400" />
|
||||
Reference in New Issue
Block a user