Rename application sections
This commit is contained in:
@@ -3,12 +3,11 @@
|
||||
<div class="flex h-16 justify-between">
|
||||
<div class="flex">
|
||||
<div class="ml-6 flex space-x-8">
|
||||
<!-- Current: "border-indigo-500 text-gray-900", Default: "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700" -->
|
||||
<a href="/" class={nav_link_class(assigns[:nav_section], :dashboard)}>
|
||||
Dashboard
|
||||
<a href="/" class={nav_link_class(assigns[:nav_section], :stats)}>
|
||||
Stats
|
||||
</a>
|
||||
<a href={~p"/records"} class={nav_link_class(assigns[:nav_section], :records)}>
|
||||
Records
|
||||
Collection
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@ defmodule MusicLibraryWeb.StatsController do
|
||||
records_count_by_format: records_count_by_format,
|
||||
records_count: records_count,
|
||||
latest_record: latest_record,
|
||||
nav_section: :dashboard
|
||||
nav_section: :stats
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -58,7 +58,7 @@ defmodule MusicLibraryWeb.RecordLive.Index do
|
||||
defp apply_action(socket, :index, params) do
|
||||
new_socket =
|
||||
socket
|
||||
|> assign(:page_title, "Listing Records")
|
||||
|> assign(:page_title, "Collection")
|
||||
|> assign(:record, nil)
|
||||
|
||||
query = params["query"] || socket.assigns.record_list_params.query
|
||||
|
||||
@@ -25,7 +25,7 @@ defmodule MusicLibraryWeb.RecordIndexTest do
|
||||
test "uses default params", %{conn: conn, records: records} do
|
||||
{:ok, index_live, html} = live(conn, ~p"/records")
|
||||
|
||||
assert html =~ "Listing Records"
|
||||
assert html =~ "Collection"
|
||||
|
||||
{present, absent} =
|
||||
Enum.split_with(records, fn record ->
|
||||
|
||||
Reference in New Issue
Block a user