From 1102c40d166b395208067b066abebc786126b652 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Mon, 23 Dec 2024 17:14:57 +0000 Subject: [PATCH] Remove back links from detail views Never used them, can be removed --- .../live/collection_live/show.ex | 11 +--- .../live/collection_live/show.html.heex | 6 -- .../live/wishlist_live/show.ex | 11 +--- .../live/wishlist_live/show.html.heex | 6 -- priv/gettext/default.pot | 56 ++++++++----------- 5 files changed, 25 insertions(+), 65 deletions(-) diff --git a/lib/music_library_web/live/collection_live/show.ex b/lib/music_library_web/live/collection_live/show.ex index 3b465277..81fc2ae7 100644 --- a/lib/music_library_web/live/collection_live/show.ex +++ b/lib/music_library_web/live/collection_live/show.ex @@ -7,15 +7,6 @@ defmodule MusicLibraryWeb.CollectionLive.Show do @impl true 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 = if static_changed?(socket) do put_flash(socket, :warning, gettext("The application has been updated, please reload.")) @@ -23,7 +14,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do socket end - {:ok, assign(socket, :back_url, back_url)} + {:ok, socket} end @impl true diff --git a/lib/music_library_web/live/collection_live/show.html.heex b/lib/music_library_web/live/collection_live/show.html.heex index 4718a73d..ff7db964 100644 --- a/lib/music_library_web/live/collection_live/show.html.heex +++ b/lib/music_library_web/live/collection_live/show.html.heex @@ -224,12 +224,6 @@
<%= Jason.encode!(@record.musicbrainz_data, pretty: true) %>
-
- <.back navigate={@back_url}> - {gettext("Back to records")} - -
- <.modal :if={@live_action == :edit} id="record-modal" diff --git a/lib/music_library_web/live/wishlist_live/show.ex b/lib/music_library_web/live/wishlist_live/show.ex index a76b19f7..57bff34e 100644 --- a/lib/music_library_web/live/wishlist_live/show.ex +++ b/lib/music_library_web/live/wishlist_live/show.ex @@ -5,15 +5,6 @@ defmodule MusicLibraryWeb.WishlistLive.Show do @impl true 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 = if static_changed?(socket) do put_flash(socket, :warning, gettext("The application has been updated, please reload.")) @@ -21,7 +12,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do socket end - {:ok, assign(socket, :back_url, back_url)} + {:ok, socket} end @impl true diff --git a/lib/music_library_web/live/wishlist_live/show.html.heex b/lib/music_library_web/live/wishlist_live/show.html.heex index b20c4278..33440dae 100644 --- a/lib/music_library_web/live/wishlist_live/show.html.heex +++ b/lib/music_library_web/live/wishlist_live/show.html.heex @@ -234,12 +234,6 @@
<%= Jason.encode!(@record.musicbrainz_data, pretty: true) %>
-
- <.back navigate={@back_url}> - {gettext("Back to wishlist")} - -
- <.modal :if={@live_action == :edit} id="record-modal" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 944a86a0..5ca5a657 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -28,16 +28,6 @@ msgstr "" msgid "Attempting to reconnect" 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 #, elixir-autogen, elixir-format msgid "Basics" @@ -52,8 +42,8 @@ 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/collection_live/index.ex:78 -#: lib/music_library_web/live/collection_live/show.ex:124 -#: lib/music_library_web/live/collection_live/show.ex:141 +#: lib/music_library_web/live/collection_live/show.ex:115 +#: lib/music_library_web/live/collection_live/show.ex:132 #, elixir-autogen, elixir-format msgid "Collection" msgstr "" @@ -71,9 +61,9 @@ msgid "Delete" msgstr "" #: 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/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 #, elixir-autogen, elixir-format msgid "Edit" @@ -214,7 +204,7 @@ msgstr "" #: 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/show.ex:114 +#: lib/music_library_web/live/wishlist_live/show.ex:105 #, elixir-autogen, elixir-format msgid "Record updated successfully" msgstr "" @@ -250,8 +240,8 @@ msgid "Search for records" msgstr "" #: lib/music_library_web/components/record_components.ex:139 -#: lib/music_library_web/live/collection_live/show.ex:147 -#: lib/music_library_web/live/wishlist_live/show.ex:144 +#: lib/music_library_web/live/collection_live/show.ex:138 +#: lib/music_library_web/live/wishlist_live/show.ex:135 #, elixir-autogen, elixir-format msgid "Show" msgstr "" @@ -279,9 +269,9 @@ msgid "Success!" msgstr "" #: 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/show.ex:19 +#: lib/music_library_web/live/wishlist_live/show.ex:10 #, elixir-autogen, elixir-format msgid "The application has been updated, please reload." msgstr "" @@ -330,7 +320,7 @@ 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/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 msgid "Wishlist" msgstr "" @@ -391,14 +381,14 @@ msgstr "" msgid "Includes" msgstr "" -#: lib/music_library_web/live/collection_live/show.ex:63 -#: lib/music_library_web/live/wishlist_live/show.ex:61 +#: lib/music_library_web/live/collection_live/show.ex:54 +#: lib/music_library_web/live/wishlist_live/show.ex:52 #, elixir-autogen, elixir-format msgid "Error refreshing MusicBrainz data" msgstr "" -#: lib/music_library_web/live/collection_live/show.ex:55 -#: lib/music_library_web/live/wishlist_live/show.ex:53 +#: lib/music_library_web/live/collection_live/show.ex:46 +#: lib/music_library_web/live/wishlist_live/show.ex:44 #, elixir-autogen, elixir-format msgid "MusicBrainz data refreshed successfully" msgstr "" @@ -408,18 +398,18 @@ msgstr "" msgid "Refresh LastFm Feed" msgstr "" -#: lib/music_library_web/live/collection_live/show.ex:95 -#: lib/music_library_web/live/wishlist_live/show.ex:73 +#: lib/music_library_web/live/collection_live/show.ex:86 +#: lib/music_library_web/live/wishlist_live/show.ex:64 #, elixir-autogen, elixir-format msgid "Cover refreshed successfully" 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 msgid "Error refreshing Cover" 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 msgid "Error refreshing cover" msgstr "" @@ -430,7 +420,7 @@ msgid "No MB ID" msgstr "" #: 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 msgid "Details" msgstr "" @@ -491,14 +481,14 @@ msgstr "" msgid "There was an error loading the play count" msgstr "" -#: lib/music_library_web/live/collection_live/show.ex:83 -#: lib/music_library_web/live/wishlist_live/show.ex:101 +#: lib/music_library_web/live/collection_live/show.ex:74 +#: lib/music_library_web/live/wishlist_live/show.ex:92 #, elixir-autogen, elixir-format msgid "Error populating genres" msgstr "" -#: lib/music_library_web/live/collection_live/show.ex:75 -#: lib/music_library_web/live/wishlist_live/show.ex:93 +#: lib/music_library_web/live/collection_live/show.ex:66 +#: lib/music_library_web/live/wishlist_live/show.ex:84 #, elixir-autogen, elixir-format msgid "Genres populated successfully" msgstr ""