Improve refresh buttons in collection details view

This commit is contained in:
Claudio Ortolina
2024-11-19 16:29:31 +00:00
parent 516dedc4c1
commit 7e93ee71bc
2 changed files with 45 additions and 15 deletions
@@ -34,12 +34,28 @@
</.link> </.link>
<.link phx-click={JS.push("refresh_cover", value: %{id: @record.id})}> <.link phx-click={JS.push("refresh_cover", value: %{id: @record.id})}>
<.button type="button" class="relative -ml-px inline-flex items-center rounded-none"> <.button type="button" class="relative -ml-px inline-flex items-center rounded-none">
<%= gettext("Refresh Cover") %> <span class="sr-only"><%= gettext("Refresh") %></span>
<.icon
id="refresh-lastfm-feed"
name="hero-arrow-path"
class="h-4 w-4 mr-1 phx-click-loading:animate-spin"
aria-hidden="true"
data-slot="icon"
/>
<%= gettext("Cover") %>
</.button> </.button>
</.link> </.link>
<.link phx-click={JS.push("refresh_musicbrainz_data", value: %{id: @record.id})}> <.link phx-click={JS.push("refresh_musicbrainz_data", value: %{id: @record.id})}>
<.button type="button" class="relative -ml-px inline-flex items-center rounded-none"> <.button type="button" class="relative -ml-px inline-flex items-center rounded-none">
<%= gettext("Refresh MB Data") %> <span class="sr-only"><%= gettext("Refresh") %></span>
<.icon
id="refresh-lastfm-feed"
name="hero-arrow-path"
class="h-4 w-4 mr-1 phx-click-loading:animate-spin"
aria-hidden="true"
data-slot="icon"
/>
<%= gettext("MB Data") %>
</.button> </.button>
</.link> </.link>
<.link <.link
+27 -13
View File
@@ -17,7 +17,7 @@ msgid "Actions"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/index.html.heex:185 #: lib/music_library_web/live/record_live/index.html.heex:185
#: lib/music_library_web/live/record_live/show.html.heex:47 #: lib/music_library_web/live/record_live/show.html.heex:63
#: lib/music_library_web/live/wishlist_live/index.html.heex:195 #: lib/music_library_web/live/wishlist_live/index.html.heex:195
#: lib/music_library_web/live/wishlist_live/show.html.heex:47 #: lib/music_library_web/live/wishlist_live/show.html.heex:47
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@@ -29,7 +29,7 @@ msgstr ""
msgid "Attempting to reconnect" msgid "Attempting to reconnect"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:140 #: lib/music_library_web/live/record_live/show.html.heex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Back to records" msgid "Back to records"
msgstr "" msgstr ""
@@ -62,7 +62,7 @@ msgid "Cover art"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/index.html.heex:187 #: lib/music_library_web/live/record_live/index.html.heex:187
#: lib/music_library_web/live/record_live/show.html.heex:53 #: lib/music_library_web/live/record_live/show.html.heex:69
#: lib/music_library_web/live/wishlist_live/index.html.heex:197 #: lib/music_library_web/live/wishlist_live/index.html.heex:197
#: lib/music_library_web/live/wishlist_live/show.html.heex:53 #: lib/music_library_web/live/wishlist_live/show.html.heex:53
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@@ -105,7 +105,7 @@ msgstr ""
msgid "Formats" msgid "Formats"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:62 #: lib/music_library_web/live/record_live/show.html.heex:78
#: lib/music_library_web/live/wishlist_live/show.html.heex:63 #: lib/music_library_web/live/wishlist_live/show.html.heex:63
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Genres" msgid "Genres"
@@ -128,7 +128,7 @@ msgstr ""
msgid "Import from MusicBrainz" msgid "Import from MusicBrainz"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:115 #: lib/music_library_web/live/record_live/show.html.heex:131
#: lib/music_library_web/live/wishlist_live/show.html.heex:108 #: lib/music_library_web/live/wishlist_live/show.html.heex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Inserted at" msgid "Inserted at"
@@ -155,7 +155,7 @@ msgid "Logout"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/form_component.ex:46 #: lib/music_library_web/live/record_live/form_component.ex:46
#: lib/music_library_web/live/record_live/show.html.heex:70 #: lib/music_library_web/live/record_live/show.html.heex:86
#: lib/music_library_web/live/wishlist_live/show.html.heex:71 #: lib/music_library_web/live/wishlist_live/show.html.heex:71
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "MusicBrainz ID" msgid "MusicBrainz ID"
@@ -205,7 +205,7 @@ msgstr ""
msgid "Purchased at" msgid "Purchased at"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:92 #: lib/music_library_web/live/record_live/show.html.heex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Purchased on" msgid "Purchased on"
msgstr "" msgstr ""
@@ -312,7 +312,7 @@ msgstr ""
msgid "Types" msgid "Types"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:123 #: lib/music_library_web/live/record_live/show.html.heex:139
#: lib/music_library_web/live/wishlist_live/show.html.heex:116 #: lib/music_library_web/live/wishlist_live/show.html.heex:116
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Updated at" msgid "Updated at"
@@ -351,13 +351,13 @@ msgstr ""
msgid "close" msgid "close"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:80 #: lib/music_library_web/live/record_live/show.html.heex:96
#: lib/music_library_web/live/wishlist_live/show.html.heex:81 #: lib/music_library_web/live/wishlist_live/show.html.heex:81
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy MusicBrainz ID to clipboard" msgid "Copy MusicBrainz ID to clipboard"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:134 #: lib/music_library_web/live/record_live/show.html.heex:150
#: lib/music_library_web/live/wishlist_live/show.html.heex:127 #: lib/music_library_web/live/wishlist_live/show.html.heex:127
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "MusicBrainz data" msgid "MusicBrainz data"
@@ -391,7 +391,7 @@ msgstr ""
msgid "Number of included records" msgid "Number of included records"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:103 #: lib/music_library_web/live/record_live/show.html.heex:119
#: lib/music_library_web/live/wishlist_live/show.html.heex:96 #: lib/music_library_web/live/wishlist_live/show.html.heex:96
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Includes" msgid "Includes"
@@ -411,7 +411,6 @@ msgstr ""
msgid "MusicBrainz data refreshed successfully" msgid "MusicBrainz data refreshed successfully"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:42
#: lib/music_library_web/live/wishlist_live/show.html.heex:42 #: lib/music_library_web/live/wishlist_live/show.html.heex:42
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Refresh MB Data" msgid "Refresh MB Data"
@@ -428,8 +427,23 @@ msgstr ""
msgid "Cover refreshed successfully" msgid "Cover refreshed successfully"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:37
#: lib/music_library_web/live/wishlist_live/show.html.heex:37 #: lib/music_library_web/live/wishlist_live/show.html.heex:37
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Refresh Cover" msgid "Refresh Cover"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:45
#, elixir-autogen, elixir-format
msgid "Cover"
msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:58
#, elixir-autogen, elixir-format
msgid "MB Data"
msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:37
#: lib/music_library_web/live/record_live/show.html.heex:50
#, elixir-autogen, elixir-format
msgid "Refresh"
msgstr ""