Change routes from "/records/*" to "/collection/*"

This commit is contained in:
Claudio Ortolina
2024-11-20 15:39:40 +00:00
parent b8f3bb9b2c
commit 5b3aab51ed
11 changed files with 56 additions and 52 deletions
@@ -13,7 +13,7 @@
autocapitalize="none"
/>
</form>
<.link patch={~p"/records/import"}>
<.link patch={~p"/collection/import"}>
<.button><%= gettext("Import") %></.button>
</.link>
</div>
@@ -36,7 +36,7 @@
>
<li
:for={{id, record} <- @streams.records}
phx-click={JS.navigate(~p"/records/#{record}")}
phx-click={JS.navigate(~p"/collection/#{record}")}
class="flex justify-between gap-x-6 py-5 hover:bg-zinc-50 dark:hover:bg-zinc-800 px-2 -mx-2 md:px-4 md:-mx-4 cursor-pointer"
id={id}
>
@@ -51,7 +51,7 @@
<.link
:for={artist <- record.artists}
class="text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300"
patch={~p"/records?query=mbid:#{artist.musicbrainz_id}"}
patch={~p"/collection?query=mbid:#{artist.musicbrainz_id}"}
>
<%= artist.name %>
</.link>
@@ -151,7 +151,7 @@
role="menuitem"
tabindex="-1"
id={"actions-#{record.id}-show"}
navigate={~p"/records/#{record}"}
navigate={~p"/collection/#{record}"}
>
<%= gettext("Show") %>
</.link>
@@ -171,7 +171,7 @@
role="menuitem"
tabindex="-1"
id={"actions-#{record.id}-edit"}
patch={~p"/records/#{record}/edit"}
patch={~p"/collection/#{record}/edit"}
>
<%= gettext("Edit") %>
</.link>