Skip to content

Commit

Permalink
fix: artist name
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglun committed Nov 27, 2024
1 parent d5fe4c6 commit 747dfc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/components/LPodcast/MiniPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ export const MiniPlayer: React.FC<MiniPlayerProps> = ({ currentTrack, isPlaying,

<Flex direction="column" className="flex-1 min-w-0 max-w-[calc(100%-80px)]">
<div className="text-sm font-medium flex-1 truncate">{currentTrack?.title || "No track selected"}</div>
<div className="text-xs flex-1 truncate">{currentTrack?.author || "Unknown artist"}</div>
<div className="text-xs flex-1 truncate">
{currentTrack?.author || currentTrack?.feed_title || "Unknown artist"}
</div>
</Flex>

<PlayListPopover currentTrack={currentTrack} isPlaying={isPlaying} />
Expand Down
13 changes: 6 additions & 7 deletions src/components/LPodcast/PlayList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export const PlayList: React.FC<PlayListProps> = ({
className="w-full group relative"
>
<Flex
align="center"
gap="3"
className={clsx(
"playlist-item w-full px-2 py-2 cursor-pointer rounded-md",
Expand Down Expand Up @@ -173,25 +172,25 @@ export const PlayList: React.FC<PlayListProps> = ({
</AnimatePresence>
</Box>

<Flex direction="column" className="flex-1 min-w-0 max-w-[calc(100%-80px)]">
<Flex direction="column" gap="1" className="flex-1 min-w-0 max-w-[calc(100%-70px)] min-h-0 py-1">
<Text
size="2"
className={clsx(
"playlist-text truncate",
track.uuid === currentTrack?.uuid ? "text-accent-12 font-medium" : "text-gray-11"
"playlist-text truncate font-medium",
track.uuid === currentTrack?.uuid ? "text-accent-12 " : "text-gray-11"
)}
>
{track.title}
</Text>
{track.author && (
{(track.author || track.feed_title) && (
<Text
size="1"
className={clsx(
"playlist-subtext truncate",
track.uuid === currentTrack?.uuid ? "text-accent-11" : "text-gray-10"
track.uuid === currentTrack?.uuid ? "text-accent-10" : "text-gray-9"
)}
>
{track.author}
{track.author || track.feed_title}
</Text>
)}
</Flex>
Expand Down

0 comments on commit 747dfc2

Please sign in to comment.