Rework error messages for failed playcount/bio fetch
This commit is contained in:
@@ -15,7 +15,13 @@
|
|||||||
</:loading>
|
</:loading>
|
||||||
<:failed :let={_failure}>
|
<:failed :let={_failure}>
|
||||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
<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>
|
</div>
|
||||||
</:failed>
|
</:failed>
|
||||||
<span :if={artist_info.play_count > 0}>
|
<span :if={artist_info.play_count > 0}>
|
||||||
@@ -44,7 +50,13 @@
|
|||||||
</:loading>
|
</:loading>
|
||||||
<:failed :let={_failure}>
|
<:failed :let={_failure}>
|
||||||
<div class="mt-4 text-sm leading-5 text-zinc-500 dark:text-zinc-400">
|
<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>
|
</div>
|
||||||
</:failed>
|
</:failed>
|
||||||
<details
|
<details
|
||||||
|
|||||||
+19
-19
@@ -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: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/index.ex:78
|
||||||
#: 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
|
||||||
@@ -303,7 +303,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: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/index.ex:76
|
||||||
#: 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
|
||||||
@@ -430,23 +430,23 @@ msgstr ""
|
|||||||
msgid "Dev dashboard"
|
msgid "Dev dashboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:96
|
#: lib/music_library_web/live/artist_live/show.html.heex:108
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:151
|
#: lib/music_library_web/live/artist_live/show.html.heex:163
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "View details"
|
msgid "View details"
|
||||||
msgstr ""
|
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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Number of scrobbles"
|
msgid "Number of scrobbles"
|
||||||
msgstr ""
|
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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Biography"
|
msgid "Biography"
|
||||||
msgstr ""
|
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
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Loading biography"
|
msgid "Loading biography"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -456,16 +456,6 @@ msgstr ""
|
|||||||
msgid "Loading play count"
|
msgid "Loading play count"
|
||||||
msgstr ""
|
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/collection_live/show.ex:74
|
||||||
#: lib/music_library_web/live/wishlist_live/show.ex:92
|
#: lib/music_library_web/live/wishlist_live/show.ex:92
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
@@ -496,8 +486,8 @@ msgstr ""
|
|||||||
msgid "Refresh cover"
|
msgid "Refresh cover"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:64
|
#: lib/music_library_web/live/artist_live/show.html.heex:76
|
||||||
#: lib/music_library_web/live/artist_live/show.html.heex:119
|
#: lib/music_library_web/live/artist_live/show.html.heex:131
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Number of albums"
|
msgid "Number of albums"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -506,3 +496,13 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Records"
|
msgid "Records"
|
||||||
msgstr ""
|
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
|
# play count
|
||||||
refute has_element?(show_live, "span", "123")
|
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")
|
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
|
end
|
||||||
|
|
||||||
test "it shows records from the collection and the wishlist", %{
|
test "it shows records from the collection and the wishlist", %{
|
||||||
|
|||||||
Reference in New Issue
Block a user