mirror of
https://github.com/R0m1k3/podcastic.git
synced 2026-10-11 17:26:20 +02:00
feat: use episode-specific images instead of podcast images
EpisodeCard and AudioPlayer now display episode.imageUrl when available, falling back to the podcast image only if the episode has none. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b73f06c2b2
commit
686c4d9007
2 files changed
+7
-7
No files matched your search
@@ -119,8 +119,8 @@ export default function AudioPlayer({ episode, onClose, userId }: AudioPlayerPro
|
|||||||
{/* Artwork + info */}
|
{/* Artwork + info */}
|
||||||
<div className="flex items-center gap-3 min-w-0 flex-1 max-w-[280px]">
|
<div className="flex items-center gap-3 min-w-0 flex-1 max-w-[280px]">
|
||||||
<div className="w-13 h-13 w-12 h-12 rounded-xl overflow-hidden border border-white/10 shrink-0 shadow-lg">
|
<div className="w-13 h-13 w-12 h-12 rounded-xl overflow-hidden border border-white/10 shrink-0 shadow-lg">
|
||||||
{podcast?.imageUrl
|
{(episode.imageUrl || podcast?.imageUrl)
|
||||||
? <img src={podcast.imageUrl} alt="" className="w-full h-full object-cover" />
|
? <img src={episode.imageUrl || podcast!.imageUrl} alt="" className="w-full h-full object-cover" />
|
||||||
: <div className="w-full h-full bg-gradient-to-br from-accent-indigo to-accent-violet flex items-center justify-center text-xl">🎙️</div>
|
: <div className="w-full h-full bg-gradient-to-br from-accent-indigo to-accent-violet flex items-center justify-center text-xl">🎙️</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -196,8 +196,8 @@ export default function AudioPlayer({ episode, onClose, userId }: AudioPlayerPro
|
|||||||
<div className="flex flex-col lg:flex-row gap-12 items-center flex-1">
|
<div className="flex flex-col lg:flex-row gap-12 items-center flex-1">
|
||||||
{/* Artwork */}
|
{/* Artwork */}
|
||||||
<div className="w-64 h-64 lg:w-80 lg:h-80 rounded-[2.5rem] overflow-hidden shadow-2xl border border-white/10 shrink-0">
|
<div className="w-64 h-64 lg:w-80 lg:h-80 rounded-[2.5rem] overflow-hidden shadow-2xl border border-white/10 shrink-0">
|
||||||
{podcast?.imageUrl
|
{(episode.imageUrl || podcast?.imageUrl)
|
||||||
? <img src={podcast.imageUrl} alt="" className="w-full h-full object-cover" />
|
? <img src={episode.imageUrl || podcast!.imageUrl} alt="" className="w-full h-full object-cover" />
|
||||||
: <div className="w-full h-full bg-gradient-to-br from-accent-indigo to-accent-violet flex items-center justify-center text-7xl">🎙️</div>
|
: <div className="w-full h-full bg-gradient-to-br from-accent-indigo to-accent-violet flex items-center justify-center text-7xl">🎙️</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ export default function EpisodeCard({ episode, onPlay }: EpisodeCardProps) {
|
|||||||
>
|
>
|
||||||
{/* Visual Header */}
|
{/* Visual Header */}
|
||||||
<div className="relative aspect-square rounded-2xl overflow-hidden mb-5 shadow-xl border border-white/5">
|
<div className="relative aspect-square rounded-2xl overflow-hidden mb-5 shadow-xl border border-white/5">
|
||||||
{podcast?.imageUrl ? (
|
{(episode.imageUrl || podcast?.imageUrl) ? (
|
||||||
<img
|
<img
|
||||||
src={podcast.imageUrl}
|
src={episode.imageUrl || podcast!.imageUrl}
|
||||||
alt={podcast.title}
|
alt={episode.title}
|
||||||
className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
|
className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in new issue
Block a user