Use round_badge component in artist page
This commit is contained in:
@@ -24,20 +24,11 @@
|
|||||||
{gettext("Error loading play count")}
|
{gettext("Error loading play count")}
|
||||||
</div>
|
</div>
|
||||||
</:failed>
|
</:failed>
|
||||||
<span :if={artist_info.play_count > 0}>
|
<span :if={artist_info.play_count > 0} class="ml-2">
|
||||||
<span class="sr-only">
|
<span class="sr-only">
|
||||||
{gettext("Number of scrobbles")}
|
{gettext("Number of scrobbles")}
|
||||||
</span>
|
</span>
|
||||||
<span class={[
|
<.round_badge text={artist_info.play_count} />
|
||||||
"rounded-full ml-2",
|
|
||||||
"px-2 py-1 text-xs font-medium",
|
|
||||||
"ring-1 ring-inset",
|
|
||||||
"bg-gray-50 dark:bg-gray-400/10",
|
|
||||||
"text-gray-600 dark:text-gray-500",
|
|
||||||
"ring-gray-500/10 dark:ring-gray-400/20"
|
|
||||||
]}>
|
|
||||||
{artist_info.play_count}
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</.async_result>
|
</.async_result>
|
||||||
</h1>
|
</h1>
|
||||||
@@ -71,20 +62,11 @@
|
|||||||
<div :if={@artist_records.collection !== []} class="mt-4">
|
<div :if={@artist_records.collection !== []} class="mt-4">
|
||||||
<h2 class="flex items-end font-semibold text-base sm:text-lg leading-5 text-zinc-700 dark:text-zinc-300">
|
<h2 class="flex items-end font-semibold text-base sm:text-lg leading-5 text-zinc-700 dark:text-zinc-300">
|
||||||
{gettext("Collection")}
|
{gettext("Collection")}
|
||||||
<span>
|
<span class="ml-2">
|
||||||
<span class="sr-only">
|
<span class="sr-only">
|
||||||
{gettext("Number of albums")}
|
{gettext("Number of albums")}
|
||||||
</span>
|
</span>
|
||||||
<span class={[
|
<.round_badge text={Enum.count(@artist_records.collection)} />
|
||||||
"rounded-full ml-2",
|
|
||||||
"px-2 py-1 text-xs font-medium",
|
|
||||||
"ring-1 ring-inset",
|
|
||||||
"bg-gray-50 dark:bg-gray-400/10",
|
|
||||||
"text-gray-600 dark:text-gray-500",
|
|
||||||
"ring-gray-500/10 dark:ring-gray-400/20"
|
|
||||||
]}>
|
|
||||||
{Enum.count(@artist_records.collection)}
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
<%!-- TODO: replace with OSS version --%>
|
<%!-- TODO: replace with OSS version --%>
|
||||||
@@ -130,16 +112,7 @@
|
|||||||
<span class="sr-only">
|
<span class="sr-only">
|
||||||
{gettext("Number of albums")}
|
{gettext("Number of albums")}
|
||||||
</span>
|
</span>
|
||||||
<span class={[
|
<.round_badge text={Enum.count(@artist_records.wishlist)} />
|
||||||
"rounded-full ml-2",
|
|
||||||
"px-2 py-1 text-xs font-medium",
|
|
||||||
"ring-1 ring-inset",
|
|
||||||
"bg-gray-50 dark:bg-gray-400/10",
|
|
||||||
"text-gray-600 dark:text-gray-500",
|
|
||||||
"ring-gray-500/10 dark:ring-gray-400/20"
|
|
||||||
]}>
|
|
||||||
{Enum.count(@artist_records.wishlist)}
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
<%!-- TODO: replace with OSS version --%>
|
<%!-- TODO: replace with OSS version --%>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ msgid "Choose a value"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/components/layouts/app.html.heex:14
|
#: 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/index.ex:83
|
||||||
#: lib/music_library_web/live/collection_live/show.ex:115
|
#: lib/music_library_web/live/collection_live/show.ex:115
|
||||||
#: lib/music_library_web/live/collection_live/show.ex:132
|
#: lib/music_library_web/live/collection_live/show.ex:132
|
||||||
@@ -306,7 +306,7 @@ msgid "Welcome to your Music Library"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/components/layouts/app.html.heex:20
|
#: 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/index.ex:83
|
||||||
#: lib/music_library_web/live/wishlist_live/show.ex:129
|
#: lib/music_library_web/live/wishlist_live/show.ex:129
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
@@ -433,8 +433,8 @@ msgstr ""
|
|||||||
msgid "Dev dashboard"
|
msgid "Dev dashboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:108
|
#: lib/music_library_web/live/artist_live/show.html.heex:90
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:163
|
#: lib/music_library_web/live/artist_live/show.html.heex:136
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "View details"
|
msgid "View details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -444,12 +444,12 @@ msgstr ""
|
|||||||
msgid "Number of scrobbles"
|
msgid "Number of scrobbles"
|
||||||
msgstr ""
|
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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Biography"
|
msgid "Biography"
|
||||||
msgstr ""
|
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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Loading biography"
|
msgid "Loading biography"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -489,8 +489,8 @@ msgstr ""
|
|||||||
msgid "Refresh cover"
|
msgid "Refresh cover"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:76
|
#: lib/music_library_web/live/artist_live/show.html.heex:67
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:131
|
#: lib/music_library_web/live/artist_live/show.html.heex:113
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Number of albums"
|
msgid "Number of albums"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -500,7 +500,7 @@ msgstr ""
|
|||||||
msgid "Records"
|
msgid "Records"
|
||||||
msgstr ""
|
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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Error loading biography"
|
msgid "Error loading biography"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
Reference in New Issue
Block a user