diff --git a/lib/music_library_web/components/scrobble_components.ex b/lib/music_library_web/components/scrobble_components.ex
index 338fb463..e9ab7dd1 100644
--- a/lib/music_library_web/components/scrobble_components.ex
+++ b/lib/music_library_web/components/scrobble_components.ex
@@ -124,4 +124,77 @@ defmodule MusicLibraryWeb.ScrobbleComponents do
"""
end
+
+ attr :album, :map, required: true
+
+ def album_metadata_tooltip(assigns) do
+ ~H"""
+ <.tooltip>
+ <.icon
+ name="hero-information-circle"
+ class="h-5 w-5 text-zinc-500 dark:text-zinc-400 cursor-pointer"
+ aria-hidden="true"
+ data-slot="icon"
+ />
+ <:content>
+
+
+
- {gettext("Album ID:")}
+ -
+
+ {@album.metadata.musicbrainz_id || gettext("Unknown")}
+
+
+
+
+
+
- {gettext("Artist ID:")}
+ -
+
+ {@album.artist.musicbrainz_id || gettext("Unknown")}
+
+
+
+
+
+
+
+ """
+ end
end
diff --git a/lib/music_library_web/live/stats_live/index.html.heex b/lib/music_library_web/live/stats_live/index.html.heex
index 9d838d9d..214c4715 100644
--- a/lib/music_library_web/live/stats_live/index.html.heex
+++ b/lib/music_library_web/live/stats_live/index.html.heex
@@ -134,73 +134,8 @@
class="whitespace-nowrap text-right text-xs sm:text-sm text-zinc-500 dark:text-zinc-400"
>
{album.scrobbled_at_label}
- <.tooltip>
- <.icon
- name="hero-information-circle"
- class="h-5 w-5 text-zinc-500 dark:text-zinc-400 cursor-pointer"
- aria-hidden="true"
- data-slot="icon"
- />
- <:content>
-
-
-
- {gettext("Album ID:")}
- -
-
- {album.metadata.musicbrainz_id || gettext("Unknown")}
-
-
-
-
-
-
- {gettext("Artist ID:")}
- -
-
- {album.artist.musicbrainz_id || gettext("Unknown")}
-
-
-
-
-
-
-
+ <.album_metadata_tooltip album={album} />
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot
index baf71c89..b7296e41 100644
--- a/priv/gettext/default.pot
+++ b/priv/gettext/default.pot
@@ -837,7 +837,6 @@ msgstr ""
#: lib/music_library_web/components/record_components.ex
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Unknown"
msgstr ""
@@ -925,25 +924,21 @@ msgid "All time"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Album ID:"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Artist ID:"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Copy album MusicBrainz ID to clipboard"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Copy artist MusicBrainz ID to clipboard"
msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po
index 9de40f92..3c088f03 100644
--- a/priv/gettext/en/LC_MESSAGES/default.po
+++ b/priv/gettext/en/LC_MESSAGES/default.po
@@ -837,7 +837,6 @@ msgstr ""
#: lib/music_library_web/components/record_components.ex
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Unknown"
msgstr ""
@@ -925,25 +924,21 @@ msgid "All time"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format, fuzzy
msgid "Album ID:"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Artist ID:"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format, fuzzy
msgid "Copy album MusicBrainz ID to clipboard"
msgstr ""
#: lib/music_library_web/components/scrobble_components.ex
-#: lib/music_library_web/live/stats_live/index.html.heex
#, elixir-autogen, elixir-format, fuzzy
msgid "Copy artist MusicBrainz ID to clipboard"
msgstr ""