From 11a469b854d8554be58c988505678d765c18df6d Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sat, 26 Oct 2024 23:12:12 +0100 Subject: [PATCH] Redesign wishlist show page --- .../live/wishlist_live/show.html.heex | 127 ++++++++++-------- priv/gettext/default.pot | 22 ++- 2 files changed, 80 insertions(+), 69 deletions(-) diff --git a/lib/music_library_web/live/wishlist_live/show.html.heex b/lib/music_library_web/live/wishlist_live/show.html.heex index bb964135..111305b2 100644 --- a/lib/music_library_web/live/wishlist_live/show.html.heex +++ b/lib/music_library_web/live/wishlist_live/show.html.heex @@ -1,68 +1,85 @@ -<.header> - <.link - :for={artist <- @record.artists} - class=" hover:text-gray-500" - patch={~p"/wishlist?query=mbid:#{artist.musicbrainz_id}"} - > - <%= artist.name %> + -
-
+
+
{@record.title} - - <%= Records.Record.format_short_label(@record.format) %> -
- <.list> - <:item title={gettext("Type")}> - - <%= @record.type %> - - - <:item title={gettext("Musicbrainz ID")}> - - <%= @record.musicbrainz_id %> - - - <:item title={gettext("Release")}> - <%= Records.Record.format_release(@record.release) %> - - <:item title={gettext("Genres")}> - +

+ <.link + :for={artist <- @record.artists} + class="text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300" + patch={~p"/wishlist?query=mbid:#{artist.musicbrainz_id}"} > - <%= genre %> - - - <:item title={gettext("Inserted at")}><%= @record.inserted_at %> - <:item title={gettext("Updated at")}><%= @record.updated_at %> - + <%= artist.name %> + +

+

+ <%= @record.title %> +

+

+ <%= Records.Record.format_release(@record.release) %> · <%= Records.Record.format_long_label( + @record.format + ) %> · <%= Records.Record.type_long_label(@record.type) %> +

+
+
+
+
+
+ <%= gettext("Genres") %> +
+
+ <%= Enum.join(@record.genres, ", ") %> +
+
+
+
+ <%= gettext("MusicBrainz ID") %> +
+
+ + <%= @record.musicbrainz_id %> + +
+
+
+
+ <%= gettext("Inserted at") %> +
+
+ <%= @record.inserted_at %> +
+
+
+
+ <%= gettext("Updated at") %> +
+
+ <%= @record.updated_at %> +
+
+
+
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 91392cdc..fefad784 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -134,7 +134,6 @@ msgid "Record updated successfully" msgstr "" #: lib/music_library_web/live/record_live/form_component.ex:45 -#: lib/music_library_web/live/wishlist_live/show.html.heex:52 #, elixir-autogen, elixir-format msgid "Release" msgstr "" @@ -150,7 +149,6 @@ msgid "Saving..." msgstr "" #: lib/music_library_web/live/record_live/form_component.ex:33 -#: lib/music_library_web/live/wishlist_live/show.html.heex:42 #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -173,7 +171,7 @@ msgstr "" #: lib/music_library_web/live/record_live/index.html.heex:166 #: lib/music_library_web/live/record_live/show.html.heex:9 #: lib/music_library_web/live/wishlist_live/index.html.heex:176 -#: lib/music_library_web/live/wishlist_live/show.html.heex:20 +#: lib/music_library_web/live/wishlist_live/show.html.heex:9 #, elixir-autogen, elixir-format msgid "Are you sure?" msgstr "" @@ -181,7 +179,7 @@ msgstr "" #: lib/music_library_web/live/record_live/index.html.heex:168 #: lib/music_library_web/live/record_live/show.html.heex:12 #: lib/music_library_web/live/wishlist_live/index.html.heex:178 -#: lib/music_library_web/live/wishlist_live/show.html.heex:23 +#: lib/music_library_web/live/wishlist_live/show.html.heex:12 #, elixir-autogen, elixir-format msgid "Delete" msgstr "" @@ -193,7 +191,7 @@ msgstr "" #: lib/music_library_web/live/wishlist_live/index.ex:55 #: lib/music_library_web/live/wishlist_live/index.html.heex:157 #: lib/music_library_web/live/wishlist_live/show.ex:50 -#: lib/music_library_web/live/wishlist_live/show.html.heex:15 +#: lib/music_library_web/live/wishlist_live/show.html.heex:4 #, elixir-autogen, elixir-format msgid "Edit" msgstr "" @@ -269,29 +267,24 @@ msgid "Back to records" msgstr "" #: lib/music_library_web/live/record_live/show.html.heex:49 -#: lib/music_library_web/live/wishlist_live/show.html.heex:55 +#: lib/music_library_web/live/wishlist_live/show.html.heex:49 #, elixir-autogen, elixir-format msgid "Genres" msgstr "" #: lib/music_library_web/live/record_live/show.html.heex:75 -#: lib/music_library_web/live/wishlist_live/show.html.heex:63 +#: lib/music_library_web/live/wishlist_live/show.html.heex:67 #, elixir-autogen, elixir-format msgid "Inserted at" msgstr "" -#: lib/music_library_web/live/wishlist_live/show.html.heex:47 -#, elixir-autogen, elixir-format -msgid "Musicbrainz ID" -msgstr "" - #: lib/music_library_web/live/record_live/show.html.heex:83 -#: lib/music_library_web/live/wishlist_live/show.html.heex:64 +#: lib/music_library_web/live/wishlist_live/show.html.heex:75 #, elixir-autogen, elixir-format msgid "Updated at" msgstr "" -#: lib/music_library_web/live/wishlist_live/show.html.heex:70 +#: lib/music_library_web/live/wishlist_live/show.html.heex:87 #, elixir-autogen, elixir-format msgid "Back to wishlist" msgstr "" @@ -343,6 +336,7 @@ msgid "Types" msgstr "" #: lib/music_library_web/live/record_live/show.html.heex:57 +#: lib/music_library_web/live/wishlist_live/show.html.heex:57 #, elixir-autogen, elixir-format msgid "MusicBrainz ID" msgstr ""