diff --git a/frontend/application/components/PodcastInlinePlayer.tsx b/frontend/application/components/PodcastInlinePlayer.tsx index a9fe9f4..2056523 100644 --- a/frontend/application/components/PodcastInlinePlayer.tsx +++ b/frontend/application/components/PodcastInlinePlayer.tsx @@ -12,7 +12,9 @@ import { Check, Headphones, Loader2, - Sparkles + Sparkles, + ChevronDown, + ChevronUp } from "lucide-react"; import SafeImage from "./SafeImage"; @@ -44,6 +46,7 @@ export default function PodcastInlinePlayer({ podcast }: PodcastInlinePlayerProp const [showRateMenu, setShowRateMenu] = useState(false); const [isBuffering, setIsBuffering] = useState(false); const [isCopied, setIsCopied] = useState(false); + const [isExpandedDesc, setIsExpandedDesc] = useState(false); // Close rate menu when clicking outside useEffect(() => { @@ -265,9 +268,27 @@ export default function PodcastInlinePlayer({ podcast }: PodcastInlinePlayerProp

{podcast.title || "پادکست و بررسی صوتی بالینی مکمل"}

-

- {podcast.description || "توضیحات صوتی دامپزشک و کادر علمی درباره اثربخشی، مکانیسم اثر و نحوه مصرف دقیق"} -

+ {(() => { + const pDesc = podcast.description || "توضیحات صوتی دامپزشک و کادر علمی درباره اثربخشی، مکانیسم اثر و نحوه مصرف دقیق"; + const isLong = pDesc.length > 120; + return ( +
+

+ {isLong && !isExpandedDesc ? `${pDesc.slice(0, 120)}...` : pDesc} +

+ {isLong && ( + + )} +
+ ); + })()} {/* Soundcloud-Style Waveform Visualizer & Track */} @@ -344,7 +365,7 @@ export default function PodcastInlinePlayer({ podcast }: PodcastInlinePlayerProp {/* Central Controls: -15s on Left, Play in Center, +15s on Right in RTL */} -
+
+ )} +
+ ); + })()}