From f813ea48e2ba0bd6cb2016e414a4fa0389094da0 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Thu, 2 Jan 2025 20:28:13 +0000 Subject: [PATCH] Use round_badge component in artist page --- .../live/artist_live/show.html.heex | 37 +++---------------- priv/gettext/default.pot | 18 ++++----- 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/lib/music_library_web/live/artist_live/show.html.heex b/lib/music_library_web/live/artist_live/show.html.heex index 3b8d340b..214f2cc3 100644 --- a/lib/music_library_web/live/artist_live/show.html.heex +++ b/lib/music_library_web/live/artist_live/show.html.heex @@ -24,20 +24,11 @@ {gettext("Error loading play count")} - 0}> + 0} class="ml-2"> {gettext("Number of scrobbles")} - - {artist_info.play_count} - + <.round_badge text={artist_info.play_count} /> @@ -71,20 +62,11 @@

{gettext("Collection")} - + {gettext("Number of albums")} - - {Enum.count(@artist_records.collection)} - + <.round_badge text={Enum.count(@artist_records.collection)} />

<%!-- TODO: replace with OSS version --%> @@ -130,16 +112,7 @@ {gettext("Number of albums")} - - {Enum.count(@artist_records.wishlist)} - + <.round_badge text={Enum.count(@artist_records.wishlist)} /> <%!-- TODO: replace with OSS version --%> diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index b6d1267f..9aa28f17 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -30,7 +30,7 @@ msgid "Choose a value" msgstr "" #: lib/music_library_web/components/layouts/app.html.heex:14 -#: lib/music_library_web/live/artist_live/show.html.heex:73 +#: lib/music_library_web/live/artist_live/show.html.heex:64 #: lib/music_library_web/live/collection_live/index.ex:83 #: lib/music_library_web/live/collection_live/show.ex:115 #: lib/music_library_web/live/collection_live/show.ex:132 @@ -306,7 +306,7 @@ msgid "Welcome to your Music Library" msgstr "" #: lib/music_library_web/components/layouts/app.html.heex:20 -#: lib/music_library_web/live/artist_live/show.html.heex:128 +#: lib/music_library_web/live/artist_live/show.html.heex:110 #: lib/music_library_web/live/wishlist_live/index.ex:83 #: lib/music_library_web/live/wishlist_live/show.ex:129 #, elixir-autogen, elixir-format @@ -433,8 +433,8 @@ msgstr "" msgid "Dev dashboard" msgstr "" -#: lib/music_library_web/live/artist_live/show.html.heex:108 -#: lib/music_library_web/live/artist_live/show.html.heex:163 +#: lib/music_library_web/live/artist_live/show.html.heex:90 +#: lib/music_library_web/live/artist_live/show.html.heex:136 #, elixir-autogen, elixir-format msgid "View details" msgstr "" @@ -444,12 +444,12 @@ msgstr "" msgid "Number of scrobbles" msgstr "" -#: lib/music_library_web/live/artist_live/show.html.heex:66 +#: lib/music_library_web/live/artist_live/show.html.heex:57 #, elixir-autogen, elixir-format msgid "Biography" msgstr "" -#: lib/music_library_web/live/artist_live/show.html.heex:48 +#: lib/music_library_web/live/artist_live/show.html.heex:39 #, elixir-autogen, elixir-format msgid "Loading biography" msgstr "" @@ -489,8 +489,8 @@ msgstr "" msgid "Refresh cover" msgstr "" -#: lib/music_library_web/live/artist_live/show.html.heex:76 -#: lib/music_library_web/live/artist_live/show.html.heex:131 +#: lib/music_library_web/live/artist_live/show.html.heex:67 +#: lib/music_library_web/live/artist_live/show.html.heex:113 #, elixir-autogen, elixir-format msgid "Number of albums" msgstr "" @@ -500,7 +500,7 @@ msgstr "" msgid "Records" msgstr "" -#: lib/music_library_web/live/artist_live/show.html.heex:59 +#: lib/music_library_web/live/artist_live/show.html.heex:50 #, elixir-autogen, elixir-format msgid "Error loading biography" msgstr ""