-
- {@artist.name}
- <.country_flag country={@country} />
-
+
+
+ {@artist.name}
+ <.country_flag country={@country} />
+
+
+
+
+ <.focus_wrap
+ id={"actions-#{@artist.musicbrainz_id}"}
+ class={[
+ "hidden pointer-events-auto absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white dark:bg-zinc-800 py-2 shadow-lg ring-1 ring-zinc-900/5 focus:outline-hidden"
+ ]}
+ role="menu"
+ aria-orientation="vertical"
+ aria-labelledby="options-menu-0-button"
+ phx-click-away={close_actions_menu(@artist.musicbrainz_id)}
+ >
+ <.link
+ class="block px-3 py-1 text-sm leading-6 text-zinc-900 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:text-zinc-300 dark:hover:bg-zinc-700"
+ role="menuitem"
+ tabindex="0"
+ id={"actions-#{@artist.musicbrainz_id}-refresh-image"}
+ phx-click={JS.push("refresh_artist_image", value: %{id: @artist.musicbrainz_id})}
+ >
+ <.icon
+ name="hero-photo"
+ class="h-4 w-4 mr-1 phx-click-loading:animate-bounce"
+ aria-hidden="true"
+ data-slot="icon"
+ />
+ {gettext("Refresh image")}
+
+
+ <.link
+ class="block px-3 py-1 text-sm leading-6 text-zinc-900 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:text-zinc-300 dark:hover:bg-zinc-700"
+ role="menuitem"
+ tabindex="0"
+ id={"actions-#{@artist.musicbrainz_id}-refresh-artist-info"}
+ phx-click={JS.push("refresh_artist_info", value: %{id: @artist.musicbrainz_id})}
+ >
+ <.icon
+ name="hero-arrow-path"
+ class="h-4 w-4 mr-1 phx-click-loading:animate-spin"
+ aria-hidden="true"
+ data-slot="icon"
+ />
+ {gettext("Refresh info")}
+
+
+
+
<.async_result :let={lastfm_artist_info} assign={@lastfm_artist_info}>
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot
index e05f88cd..d7fedddc 100644
--- a/priv/gettext/default.pot
+++ b/priv/gettext/default.pot
@@ -124,6 +124,7 @@ msgid "No results"
msgstr ""
#: lib/music_library_web/components/record_components.ex
+#: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex
#, elixir-autogen, elixir-format
@@ -817,3 +818,33 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "More"
msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format
+msgid "Artist image refreshed successfully"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format
+msgid "Artist info refreshed successfully"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format
+msgid "Error refreshing artist image"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format
+msgid "Error refreshing artist info"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.html.heex
+#, elixir-autogen, elixir-format
+msgid "Refresh image"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.html.heex
+#, elixir-autogen, elixir-format
+msgid "Refresh info"
+msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po
index 70adcb1b..bb48a955 100644
--- a/priv/gettext/en/LC_MESSAGES/default.po
+++ b/priv/gettext/en/LC_MESSAGES/default.po
@@ -124,6 +124,7 @@ msgid "No results"
msgstr ""
#: lib/music_library_web/components/record_components.ex
+#: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex
#, elixir-autogen, elixir-format
@@ -817,3 +818,33 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "More"
msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format, fuzzy
+msgid "Artist image refreshed successfully"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format, fuzzy
+msgid "Artist info refreshed successfully"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format, fuzzy
+msgid "Error refreshing artist image"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.ex
+#, elixir-autogen, elixir-format, fuzzy
+msgid "Error refreshing artist info"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.html.heex
+#, elixir-autogen, elixir-format
+msgid "Refresh image"
+msgstr ""
+
+#: lib/music_library_web/live/artist_live/show.html.heex
+#, elixir-autogen, elixir-format, fuzzy
+msgid "Refresh info"
+msgstr ""