feat: show relative watched date and comment preview in profile entries

This commit is contained in:
2026-06-11 13:03:49 +02:00
parent 3cbb406ea7
commit 549923b92e
3 changed files with 5 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ export function MovieCard({ movie, rating, comment, subtitle, variant = "full",
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-semibold">{movie.title}</p>
{subtitle && <p className="text-xs text-muted-foreground">{subtitle}</p>}
{comment && <p className="truncate text-xs text-muted-foreground/70">{comment}</p>}
</div>
{rating != null && <StarDisplay rating={rating} size="xs" />}
</Link>

View File

@@ -13,6 +13,7 @@ import { EmptyState } from "@/components/empty-state"
import { SwipeTabs } from "@/components/swipe-tabs"
import { VirtualList } from "@/components/virtual-list"
import { useInfiniteDiary } from "@/hooks/use-diary"
import { timeAgo } from "@/lib/date"
import type { UserProfileResponse } from "@/lib/api/users"
type ProfileViewProps = {
@@ -153,7 +154,7 @@ function DiaryTab({ sortBy, search }: { sortBy: string; userId?: string; search?
movie={e.movie}
rating={e.review.rating}
comment={e.review.comment}
subtitle={e.review.watched_at.slice(0, 10)}
subtitle={t("profile.watchedAgo", { when: timeAgo(e.review.watched_at) })}
variant="compact"
/>
)}

View File

@@ -123,7 +123,8 @@
"noTrends": "No trends yet",
"topDirectors": "Top Directors",
"monthlyActivity": "Monthly Activity",
"searchPlaceholder": "Search entries..."
"searchPlaceholder": "Search entries...",
"watchedAgo": "Watched {{when}}"
},
"social": {
"title": "Social",