fix: post reshare and audio player enhancements

This commit is contained in:
gosangam
2026-06-03 14:41:34 +05:30
parent ddc6d3c7bf
commit 48dd450a15
5 changed files with 266 additions and 87 deletions
+5 -4
View File
@@ -222,10 +222,11 @@ function CoverSlide({
className="object-cover"
unoptimized
/>
{/* Full-coverage scrim — even the top carries ~40% black so the
badge and any white text overlaid up there stay readable
without looking blended with the cover image. */}
<div className="absolute inset-0 bg-linear-to-t from-black/95 via-black/70 to-black/40" />
{/* Light scrim — enough darkness at the bottom for the title
and post-count line to read, but the top stays close to
the original image so the cover photo isn't muted into a
near-black plate. */}
<div className="absolute inset-0 bg-linear-to-t from-black/75 via-black/40 to-black/15" />
</>
) : (
<div className="absolute inset-0" style={quoteCardBgStyle()} />
+16 -8
View File
@@ -46,15 +46,23 @@ export function PostCard({
return (
<article className="rounded-xl bg-card ring-1 ring-foreground/10 p-5">
{/* Reshare attribution — only on rows the feed owner reshared.
The author block below still shows the original author; this
strip just signals "this is on this feed because it was
reshared," matching the Twitter/X retweet convention. */}
{post.reshared_at ? (
<div className="flex items-center gap-1.5 text-xs text-muted-foreground mb-3">
{/* Reshare attribution — only on rows that are themselves
reshares. The link goes to the original author's profile;
their handle is rendered inline so the source is obvious.
The post body below shows the resharer as the author (this
IS their post — likes, comments, and background all belong
to them, independent from the original). */}
{post.reshared_from_post_id && post.original_author_handle ? (
<Link
href={`/u/${post.original_author_handle}`}
className="inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground mb-3 transition-colors"
>
<Repeat2 className="size-3.5" />
<span>Reshared</span>
</div>
<span>
Reshared from{" "}
<span className="font-medium">@{post.original_author_handle}</span>
</span>
</Link>
) : null}
{/* Author header — identity on the left, overflow menu on the
right. The menu trigger only renders when there are items to
+15 -8
View File
@@ -75,15 +75,22 @@ export function PostScrollCard({
id={`post-${post.id}`}
className="rounded-2xl overflow-hidden bg-card ring-1 ring-foreground/10 scroll-mt-20 sm:scroll-mt-24"
>
{/* Reshare attribution — only on rows the feed owner reshared.
The author block below still names the original author; this
strip just signals why the post is in this feed. Matches the
Twitter/X retweet convention. */}
{post.reshared_at ? (
<div className="flex items-center gap-1.5 px-4 pt-3 text-xs text-muted-foreground">
{/* Reshare attribution — only on rows that are themselves
reshares. Tappable link → original author's profile. The card
body below shows the resharer as the author (this row IS the
resharer's own post — likes, comments, background all belong
to them, decoupled from the original). */}
{post.reshared_from_post_id && post.original_author_handle ? (
<Link
href={`/u/${post.original_author_handle}`}
className="inline-flex items-center gap-1.5 px-4 pt-3 text-xs text-muted-foreground hover:text-foreground transition-colors"
>
<Repeat2 className="size-3.5" />
<span>Reshared</span>
</div>
<span>
Reshared from{" "}
<span className="font-medium">@{post.original_author_handle}</span>
</span>
</Link>
) : null}
{/* Author header — identity on the left, three-dot overflow menu
on the right (Delete for author, Block/Report for everyone