fix: ui tweaks and fixes (#134)

This commit is contained in:
Gabe Farrell 2026-01-13 23:25:31 -05:00 committed by GitHub
parent c2a0987946
commit 288d04d714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 40 additions and 27 deletions

View file

@ -50,17 +50,17 @@ export default function Album() {
{album.listen_count} play{album.listen_count > 1 ? "s" : ""}
</p>
)}
{
{album.time_listened && (
<p title={Math.floor(album.time_listened / 60 / 60) + " hours"}>
{timeListenedString(album.time_listened)}
</p>
}
{
)}
{album.first_listen && (
<p title={new Date(album.first_listen * 1000).toLocaleString()}>
Listening since{" "}
{new Date(album.first_listen * 1000).toLocaleDateString()}
</p>
}
)}
</div>
}
>

View file

@ -49,23 +49,28 @@ export default function Track() {
}}
subContent={
<div className="flex flex-col gap-2 items-start">
<Link to={`/album/${track.album_id}`}>appears on {album.title}</Link>
{track.listen_count && (
<p>
Appears on{" "}
<Link className="hover:underline" to={`/album/${track.album_id}`}>
{album.title}
</Link>
</p>
{track.listen_count !== 0 && (
<p>
{track.listen_count} play{track.listen_count > 1 ? "s" : ""}
</p>
)}
{
{track.time_listened !== 0 && (
<p title={Math.floor(track.time_listened / 60 / 60) + " hours"}>
{timeListenedString(track.time_listened)}
</p>
}
{
)}
{track.first_listen > 0 && (
<p title={new Date(track.first_listen * 1000).toLocaleString()}>
Listening since{" "}
{new Date(track.first_listen * 1000).toLocaleDateString()}
</p>
}
)}
</div>
}
>