Remove back links from detail views

Never used them, can be removed
This commit is contained in:
Claudio Ortolina
2024-12-23 17:14:57 +00:00
parent f71fa6fa25
commit 1102c40d16
5 changed files with 25 additions and 65 deletions
@@ -7,15 +7,6 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
@impl true @impl true
def mount(_params, _session, socket) do def mount(_params, _session, socket) do
back_url =
if connected?(socket) do
socket
|> get_connect_params()
|> Map.get("_live_referer", ~p"/collection")
else
~p"/collection"
end
socket = socket =
if static_changed?(socket) do if static_changed?(socket) do
put_flash(socket, :warning, gettext("The application has been updated, please reload.")) put_flash(socket, :warning, gettext("The application has been updated, please reload."))
@@ -23,7 +14,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
socket socket
end end
{:ok, assign(socket, :back_url, back_url)} {:ok, socket}
end end
@impl true @impl true
@@ -224,12 +224,6 @@
<pre><code class="text-xs sm:text-sm"><%= Jason.encode!(@record.musicbrainz_data, pretty: true) %></code></pre> <pre><code class="text-xs sm:text-sm"><%= Jason.encode!(@record.musicbrainz_data, pretty: true) %></code></pre>
</details> </details>
<div class="mt-4">
<.back navigate={@back_url}>
{gettext("Back to records")}
</.back>
</div>
<.modal <.modal
:if={@live_action == :edit} :if={@live_action == :edit}
id="record-modal" id="record-modal"
@@ -5,15 +5,6 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
@impl true @impl true
def mount(_params, _session, socket) do def mount(_params, _session, socket) do
back_url =
if connected?(socket) do
socket
|> get_connect_params()
|> Map.get("_live_referer", ~p"/wishlist")
else
~p"/wishlist"
end
socket = socket =
if static_changed?(socket) do if static_changed?(socket) do
put_flash(socket, :warning, gettext("The application has been updated, please reload.")) put_flash(socket, :warning, gettext("The application has been updated, please reload."))
@@ -21,7 +12,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
socket socket
end end
{:ok, assign(socket, :back_url, back_url)} {:ok, socket}
end end
@impl true @impl true
@@ -234,12 +234,6 @@
<pre><code class="text-xs sm:text-sm"><%= Jason.encode!(@record.musicbrainz_data, pretty: true) %></code></pre> <pre><code class="text-xs sm:text-sm"><%= Jason.encode!(@record.musicbrainz_data, pretty: true) %></code></pre>
</details> </details>
<div class="mt-4">
<.back navigate={@back_url}>
{gettext("Back to wishlist")}
</.back>
</div>
<.modal <.modal
:if={@live_action == :edit} :if={@live_action == :edit}
id="record-modal" id="record-modal"
+23 -33
View File
@@ -28,16 +28,6 @@ msgstr ""
msgid "Attempting to reconnect" msgid "Attempting to reconnect"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/show.html.heex:229
#, elixir-autogen, elixir-format
msgid "Back to records"
msgstr ""
#: lib/music_library_web/live/wishlist_live/show.html.heex:239
#, elixir-autogen, elixir-format
msgid "Back to wishlist"
msgstr ""
#: lib/music_library_web/live/stats_live/index.html.heex:3 #: lib/music_library_web/live/stats_live/index.html.heex:3
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Basics" msgid "Basics"
@@ -52,8 +42,8 @@ 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:61
#: 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:124 #: lib/music_library_web/live/collection_live/show.ex:115
#: lib/music_library_web/live/collection_live/show.ex:141 #: lib/music_library_web/live/collection_live/show.ex:132
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Collection" msgid "Collection"
msgstr "" msgstr ""
@@ -71,9 +61,9 @@ msgid "Delete"
msgstr "" msgstr ""
#: lib/music_library_web/components/record_components.ex:159 #: lib/music_library_web/components/record_components.ex:159
#: lib/music_library_web/live/collection_live/show.ex:148 #: lib/music_library_web/live/collection_live/show.ex:139
#: lib/music_library_web/live/collection_live/show.html.heex:70 #: lib/music_library_web/live/collection_live/show.html.heex:70
#: lib/music_library_web/live/wishlist_live/show.ex:145 #: lib/music_library_web/live/wishlist_live/show.ex:136
#: lib/music_library_web/live/wishlist_live/show.html.heex:70 #: lib/music_library_web/live/wishlist_live/show.html.heex:70
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Edit" msgid "Edit"
@@ -214,7 +204,7 @@ msgstr ""
#: lib/music_library_web/live/record_live/form_component.ex:123 #: lib/music_library_web/live/record_live/form_component.ex:123
#: lib/music_library_web/live/wishlist_live/index.ex:141 #: lib/music_library_web/live/wishlist_live/index.ex:141
#: lib/music_library_web/live/wishlist_live/show.ex:114 #: lib/music_library_web/live/wishlist_live/show.ex:105
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record updated successfully" msgid "Record updated successfully"
msgstr "" msgstr ""
@@ -250,8 +240,8 @@ msgid "Search for records"
msgstr "" msgstr ""
#: lib/music_library_web/components/record_components.ex:139 #: lib/music_library_web/components/record_components.ex:139
#: lib/music_library_web/live/collection_live/show.ex:147 #: lib/music_library_web/live/collection_live/show.ex:138
#: lib/music_library_web/live/wishlist_live/show.ex:144 #: lib/music_library_web/live/wishlist_live/show.ex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Show" msgid "Show"
msgstr "" msgstr ""
@@ -279,9 +269,9 @@ msgid "Success!"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/index.ex:20 #: lib/music_library_web/live/collection_live/index.ex:20
#: lib/music_library_web/live/collection_live/show.ex:21 #: lib/music_library_web/live/collection_live/show.ex:12
#: lib/music_library_web/live/wishlist_live/index.ex:20 #: lib/music_library_web/live/wishlist_live/index.ex:20
#: lib/music_library_web/live/wishlist_live/show.ex:19 #: lib/music_library_web/live/wishlist_live/show.ex:10
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "The application has been updated, please reload." msgid "The application has been updated, please reload."
msgstr "" msgstr ""
@@ -330,7 +320,7 @@ 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:116
#: 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:138 #: lib/music_library_web/live/wishlist_live/show.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wishlist" msgid "Wishlist"
msgstr "" msgstr ""
@@ -391,14 +381,14 @@ msgstr ""
msgid "Includes" msgid "Includes"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/show.ex:63 #: lib/music_library_web/live/collection_live/show.ex:54
#: lib/music_library_web/live/wishlist_live/show.ex:61 #: lib/music_library_web/live/wishlist_live/show.ex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Error refreshing MusicBrainz data" msgid "Error refreshing MusicBrainz data"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/show.ex:55 #: lib/music_library_web/live/collection_live/show.ex:46
#: lib/music_library_web/live/wishlist_live/show.ex:53 #: lib/music_library_web/live/wishlist_live/show.ex:44
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "MusicBrainz data refreshed successfully" msgid "MusicBrainz data refreshed successfully"
msgstr "" msgstr ""
@@ -408,18 +398,18 @@ msgstr ""
msgid "Refresh LastFm Feed" msgid "Refresh LastFm Feed"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/show.ex:95 #: lib/music_library_web/live/collection_live/show.ex:86
#: lib/music_library_web/live/wishlist_live/show.ex:73 #: lib/music_library_web/live/wishlist_live/show.ex:64
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cover refreshed successfully" msgid "Cover refreshed successfully"
msgstr "" msgstr ""
#: lib/music_library_web/live/wishlist_live/show.ex:81 #: lib/music_library_web/live/wishlist_live/show.ex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Error refreshing Cover" msgid "Error refreshing Cover"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/show.ex:103 #: lib/music_library_web/live/collection_live/show.ex:94
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Error refreshing cover" msgid "Error refreshing cover"
msgstr "" msgstr ""
@@ -430,7 +420,7 @@ msgid "No MB ID"
msgstr "" msgstr ""
#: lib/music_library_web/live/artist_live/show.ex:39 #: lib/music_library_web/live/artist_live/show.ex:39
#: lib/music_library_web/live/collection_live/show.ex:122 #: lib/music_library_web/live/collection_live/show.ex:113
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Details" msgid "Details"
msgstr "" msgstr ""
@@ -491,14 +481,14 @@ msgstr ""
msgid "There was an error loading the play count" msgid "There was an error loading the play count"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/show.ex:83 #: lib/music_library_web/live/collection_live/show.ex:74
#: lib/music_library_web/live/wishlist_live/show.ex:101 #: lib/music_library_web/live/wishlist_live/show.ex:92
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Error populating genres" msgid "Error populating genres"
msgstr "" msgstr ""
#: lib/music_library_web/live/collection_live/show.ex:75 #: lib/music_library_web/live/collection_live/show.ex:66
#: lib/music_library_web/live/wishlist_live/show.ex:93 #: lib/music_library_web/live/wishlist_live/show.ex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Genres populated successfully" msgid "Genres populated successfully"
msgstr "" msgstr ""