Various UI improvements

This commit is contained in:
riversedge
2026-02-04 23:15:00 -05:00
parent b75bea3860
commit 424bd3fd25
9 changed files with 262 additions and 67 deletions
+11 -1
View File
@@ -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>