Link to collected albums in scrobble activity

This commit is contained in:
Claudio Ortolina
2025-01-01 16:11:14 +00:00
parent 48a4b308cc
commit 5973206da3
4 changed files with 24 additions and 16 deletions
@@ -142,19 +142,21 @@
>
{gettext("No MB ID")}
</span>
<span
:if={track.album.musicbrainz_id in @collected_release_ids}
class={[
<.link
:if={record_id = collected_record?(@collected_releases, track.album.musicbrainz_id)}
navigate={~p"/collection/#{record_id}"}
>
<span class={[
"inline-flex items-center rounded-md",
"px-2 py-1 text-xs font-medium",
"ring-1 ring-inset",
"bg-green-50 dark:bg-green-500/10",
"text-green-700 dark:text-green-400",
"ring-green-600/20 dark:ring-green-500/20"
]}
>
{gettext("Collected")}
</span>
]}>
{gettext("Collected")}
</span>
</.link>
<span
:if={track.album.musicbrainz_id in @wishlisted_release_ids}
class={[
@@ -173,7 +175,7 @@
<div
:if={
track.album.musicbrainz_id !== "" and
track.album.musicbrainz_id not in @collected_release_ids and
!collected_record?(@collected_releases, track.album.musicbrainz_id) and
track.album.musicbrainz_id not in @wishlisted_release_ids
}
class="relative flex-none"