Rework error messages for failed playcount/bio fetch
This commit is contained in:
@@ -15,7 +15,13 @@
|
||||
</:loading>
|
||||
<:failed :let={_failure}>
|
||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
||||
{gettext("There was an error loading the play count")}
|
||||
<.icon
|
||||
name="hero-exclamation-triangle"
|
||||
class="-mt-1 mr-1 ml-2 h-5 w-5"
|
||||
aria-hidden="true"
|
||||
data-slot="icon"
|
||||
/>
|
||||
{gettext("Error loading play count")}
|
||||
</div>
|
||||
</:failed>
|
||||
<span :if={artist_info.play_count > 0}>
|
||||
@@ -44,7 +50,13 @@
|
||||
</:loading>
|
||||
<:failed :let={_failure}>
|
||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
||||
{gettext("There was an error loading the biography")}
|
||||
<.icon
|
||||
name="hero-exclamation-triangle"
|
||||
class="-mt-1 mr-1 h-5 w-5"
|
||||
aria-hidden="true"
|
||||
data-slot="icon"
|
||||
/>
|
||||
{gettext("Error loading biography")}
|
||||
</div>
|
||||
</:failed>
|
||||
<details
|
||||
|
||||
+19
-19
@@ -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:61
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:73
|
||||
#: lib/music_library_web/live/collection_live/index.ex:78
|
||||
#: lib/music_library_web/live/collection_live/show.ex:115
|
||||
#: lib/music_library_web/live/collection_live/show.ex:132
|
||||
@@ -303,7 +303,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:116
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:128
|
||||
#: lib/music_library_web/live/wishlist_live/index.ex:76
|
||||
#: lib/music_library_web/live/wishlist_live/show.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
@@ -430,23 +430,23 @@ msgstr ""
|
||||
msgid "Dev dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:96
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:151
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:108
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:163
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View details"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:23
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:29
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Number of scrobbles"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:54
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:66
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Biography"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:42
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Loading biography"
|
||||
msgstr ""
|
||||
@@ -456,16 +456,6 @@ msgstr ""
|
||||
msgid "Loading play count"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:47
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "There was an error loading the biography"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:18
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "There was an error loading the play count"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/collection_live/show.ex:74
|
||||
#: lib/music_library_web/live/wishlist_live/show.ex:92
|
||||
#, elixir-autogen, elixir-format
|
||||
@@ -496,8 +486,8 @@ msgstr ""
|
||||
msgid "Refresh cover"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:64
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:119
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:76
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:131
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Number of albums"
|
||||
msgstr ""
|
||||
@@ -506,3 +496,13 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:59
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Error loading biography"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/artist_live/show.html.heex:24
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Error loading play count"
|
||||
msgstr ""
|
||||
|
||||
@@ -70,10 +70,10 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do
|
||||
|
||||
# play count
|
||||
refute has_element?(show_live, "span", "123")
|
||||
assert has_element?(show_live, "div", "There was an error loading the play count")
|
||||
assert has_element?(show_live, "div", "Error loading play count")
|
||||
|
||||
refute has_element?(show_live, "summary", "Biography")
|
||||
assert has_element?(show_live, "div", "There was an error loading the biography")
|
||||
assert has_element?(show_live, "div", "Error loading biography")
|
||||
end
|
||||
|
||||
test "it shows records from the collection and the wishlist", %{
|
||||
|
||||
Reference in New Issue
Block a user