Improve refresh buttons in wishlist details view

This commit is contained in:
Claudio Ortolina
2024-11-19 16:31:06 +00:00
parent 7e93ee71bc
commit eee70b0999
2 changed files with 32 additions and 22 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
+14 -20
View File
@@ -19,7 +19,7 @@ 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:63 #: 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:63
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure?" msgid "Are you sure?"
msgstr "" msgstr ""
@@ -34,7 +34,7 @@ msgstr ""
msgid "Back to records" msgid "Back to records"
msgstr "" msgstr ""
#: lib/music_library_web/live/wishlist_live/show.html.heex:133 #: lib/music_library_web/live/wishlist_live/show.html.heex:149
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Back to wishlist" msgid "Back to wishlist"
msgstr "" msgstr ""
@@ -64,7 +64,7 @@ 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:69 #: 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:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
@@ -106,7 +106,7 @@ msgid "Formats"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:78 #: 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:79
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Genres" msgid "Genres"
msgstr "" msgstr ""
@@ -129,7 +129,7 @@ msgid "Import from MusicBrainz"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:131 #: 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:124
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Inserted at" msgid "Inserted at"
msgstr "" msgstr ""
@@ -156,7 +156,7 @@ 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:86 #: 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:87
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "MusicBrainz ID" msgid "MusicBrainz ID"
msgstr "" msgstr ""
@@ -313,7 +313,7 @@ msgid "Types"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:139 #: 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:132
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Updated at" msgid "Updated at"
msgstr "" msgstr ""
@@ -352,13 +352,13 @@ msgid "close"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:96 #: 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:97
#, 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:150 #: 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:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "MusicBrainz data" msgid "MusicBrainz data"
msgstr "" msgstr ""
@@ -392,7 +392,7 @@ msgid "Number of included records"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:119 #: 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:112
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Includes" msgid "Includes"
msgstr "" msgstr ""
@@ -411,11 +411,6 @@ msgstr ""
msgid "MusicBrainz data refreshed successfully" msgid "MusicBrainz data refreshed successfully"
msgstr "" msgstr ""
#: lib/music_library_web/live/wishlist_live/show.html.heex:42
#, elixir-autogen, elixir-format
msgid "Refresh MB Data"
msgstr ""
#: lib/music_library_web/live/stats_live/index.html.heex:74 #: lib/music_library_web/live/stats_live/index.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Refresh LastFm Feed" msgid "Refresh LastFm Feed"
@@ -427,23 +422,22 @@ msgstr ""
msgid "Cover refreshed successfully" msgid "Cover refreshed successfully"
msgstr "" msgstr ""
#: lib/music_library_web/live/wishlist_live/show.html.heex:37
#, elixir-autogen, elixir-format
msgid "Refresh Cover"
msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:45 #: lib/music_library_web/live/record_live/show.html.heex:45
#: lib/music_library_web/live/wishlist_live/show.html.heex:45
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cover" msgid "Cover"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:58 #: lib/music_library_web/live/record_live/show.html.heex:58
#: lib/music_library_web/live/wishlist_live/show.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "MB Data" msgid "MB Data"
msgstr "" msgstr ""
#: lib/music_library_web/live/record_live/show.html.heex:37 #: lib/music_library_web/live/record_live/show.html.heex:37
#: lib/music_library_web/live/record_live/show.html.heex:50 #: lib/music_library_web/live/record_live/show.html.heex:50
#: lib/music_library_web/live/wishlist_live/show.html.heex:37
#: lib/music_library_web/live/wishlist_live/show.html.heex:50
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Refresh" msgid "Refresh"
msgstr "" msgstr ""