feat: show relative watched date and comment preview in profile entries
This commit is contained in:
@@ -23,6 +23,7 @@ export function MovieCard({ movie, rating, comment, subtitle, variant = "full",
|
|||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<p className="truncate text-sm font-semibold">{movie.title}</p>
|
<p className="truncate text-sm font-semibold">{movie.title}</p>
|
||||||
{subtitle && <p className="text-xs text-muted-foreground">{subtitle}</p>}
|
{subtitle && <p className="text-xs text-muted-foreground">{subtitle}</p>}
|
||||||
|
{comment && <p className="truncate text-xs text-muted-foreground/70">{comment}</p>}
|
||||||
</div>
|
</div>
|
||||||
{rating != null && <StarDisplay rating={rating} size="xs" />}
|
{rating != null && <StarDisplay rating={rating} size="xs" />}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { EmptyState } from "@/components/empty-state"
|
|||||||
import { SwipeTabs } from "@/components/swipe-tabs"
|
import { SwipeTabs } from "@/components/swipe-tabs"
|
||||||
import { VirtualList } from "@/components/virtual-list"
|
import { VirtualList } from "@/components/virtual-list"
|
||||||
import { useInfiniteDiary } from "@/hooks/use-diary"
|
import { useInfiniteDiary } from "@/hooks/use-diary"
|
||||||
|
import { timeAgo } from "@/lib/date"
|
||||||
import type { UserProfileResponse } from "@/lib/api/users"
|
import type { UserProfileResponse } from "@/lib/api/users"
|
||||||
|
|
||||||
type ProfileViewProps = {
|
type ProfileViewProps = {
|
||||||
@@ -153,7 +154,7 @@ function DiaryTab({ sortBy, search }: { sortBy: string; userId?: string; search?
|
|||||||
movie={e.movie}
|
movie={e.movie}
|
||||||
rating={e.review.rating}
|
rating={e.review.rating}
|
||||||
comment={e.review.comment}
|
comment={e.review.comment}
|
||||||
subtitle={e.review.watched_at.slice(0, 10)}
|
subtitle={t("profile.watchedAgo", { when: timeAgo(e.review.watched_at) })}
|
||||||
variant="compact"
|
variant="compact"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -123,7 +123,8 @@
|
|||||||
"noTrends": "No trends yet",
|
"noTrends": "No trends yet",
|
||||||
"topDirectors": "Top Directors",
|
"topDirectors": "Top Directors",
|
||||||
"monthlyActivity": "Monthly Activity",
|
"monthlyActivity": "Monthly Activity",
|
||||||
"searchPlaceholder": "Search entries..."
|
"searchPlaceholder": "Search entries...",
|
||||||
|
"watchedAgo": "Watched {{when}}"
|
||||||
},
|
},
|
||||||
"social": {
|
"social": {
|
||||||
"title": "Social",
|
"title": "Social",
|
||||||
|
|||||||
Reference in New Issue
Block a user