Various UI improvements
This commit is contained in:
+11
-1
@@ -361,12 +361,22 @@ const SongItem: React.FC<SongItemProps> = ({
|
||||
{song.progress !== undefined ? (
|
||||
<div
|
||||
className="h-full bg-gradient-to-r from-pink-500 to-purple-600 transition-all"
|
||||
style={{ width: `${Math.min(100, Math.max(0, song.progress * 100))}%` }}
|
||||
style={{
|
||||
width: `${Math.min(
|
||||
100,
|
||||
Math.max(0, (song.progress > 1 ? song.progress / 100 : song.progress) * 100)
|
||||
)}%`,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<div className="h-full w-1/3 bg-gradient-to-r from-pink-500 to-purple-600 animate-pulse" />
|
||||
)}
|
||||
</div>
|
||||
{song.progress !== undefined && (
|
||||
<div className="mt-1 text-[10px] text-zinc-500 dark:text-zinc-400">
|
||||
{Math.round((song.progress > 1 ? song.progress / 100 : song.progress) * 100)}%
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user