Improved UX of more pages
This commit is contained in:
parent
81596e7e3c
commit
2a3b8283b1
7 changed files with 14 additions and 10 deletions
|
|
@ -2,7 +2,9 @@
|
||||||
<.link href={~p"/media_profiles"}>
|
<.link href={~p"/media_profiles"}>
|
||||||
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
||||||
</.link>
|
</.link>
|
||||||
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-4">Edit Media Profile</h2>
|
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-4">
|
||||||
|
Editing "<%= @media_profile.name %>"
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rounded-sm border border-stroke bg-white px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1">
|
<div class="rounded-sm border border-stroke bg-white px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
||||||
</.link>
|
</.link>
|
||||||
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-2">
|
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-2">
|
||||||
Media Profile <span class="hidden sm:inline">#<%= @media_profile.id %></span>
|
<%= @media_profile.name %>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="mb-6 flex gap-3 flex-row items-center justify-between">
|
<div class="mb-6 flex gap-3 flex-row items-center justify-between">
|
||||||
<h2 class="text-title-md2 font-bold text-black dark:text-white">
|
<h2 class="text-title-md2 font-bold text-black dark:text-white">
|
||||||
<span class="hidden sm:inline">Search </span>Results for "<%= StringUtils.truncate(@search_term, 50) %>"
|
Results for "<%= StringUtils.truncate(@search_term, 50) %>"
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<%= if match?([_|_], @search_results) do %>
|
<%= if match?([_|_], @search_results) do %>
|
||||||
<.table rows={@search_results} table_class="text-black dark:text-white">
|
<.table rows={@search_results} table_class="text-black dark:text-white">
|
||||||
<:col :let={result} label="Title">
|
<:col :let={result} label="Title">
|
||||||
<%= StringUtils.truncate(result.title, 40) %>
|
<%= result.title %>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={result} label="Excerpt">
|
<:col :let={result} label="Excerpt">
|
||||||
<.highlight_search_terms text={result.matching_search_term} />
|
<.highlight_search_terms text={result.matching_search_term} />
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
<.link href={~p"/sources"}>
|
<.link href={~p"/sources"}>
|
||||||
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
||||||
</.link>
|
</.link>
|
||||||
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-4">Edit Source</h2>
|
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-4">
|
||||||
|
Editing "<%= @source.custom_name %>"
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rounded-sm border border-stroke bg-white px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1">
|
<div class="rounded-sm border border-stroke bg-white px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
||||||
</.link>
|
</.link>
|
||||||
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-4">
|
<h2 class="text-title-md2 font-bold text-black dark:text-white ml-4">
|
||||||
Source <span class="hidden sm:inline">#<%= @source.id %></span>
|
<%= @source.custom_name %>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ defmodule PinchflatWeb.MediaProfileControllerTest do
|
||||||
media_profile: media_profile
|
media_profile: media_profile
|
||||||
} do
|
} do
|
||||||
conn = get(conn, ~p"/media_profiles/#{media_profile}/edit")
|
conn = get(conn, ~p"/media_profiles/#{media_profile}/edit")
|
||||||
assert html_response(conn, 200) =~ "Edit Media Profile"
|
assert html_response(conn, 200) =~ "Editing \"#{media_profile.name}\""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -98,7 +98,7 @@ defmodule PinchflatWeb.MediaProfileControllerTest do
|
||||||
|
|
||||||
test "renders errors when data is invalid", %{conn: conn, media_profile: media_profile} do
|
test "renders errors when data is invalid", %{conn: conn, media_profile: media_profile} do
|
||||||
conn = put(conn, ~p"/media_profiles/#{media_profile}", media_profile: @invalid_attrs)
|
conn = put(conn, ~p"/media_profiles/#{media_profile}", media_profile: @invalid_attrs)
|
||||||
assert html_response(conn, 200) =~ "Edit Media Profile"
|
assert html_response(conn, 200) =~ "Editing \"#{media_profile.name}\""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ defmodule PinchflatWeb.SourceControllerTest do
|
||||||
|
|
||||||
test "renders form for editing chosen source", %{conn: conn, source: source} do
|
test "renders form for editing chosen source", %{conn: conn, source: source} do
|
||||||
conn = get(conn, ~p"/sources/#{source}/edit")
|
conn = get(conn, ~p"/sources/#{source}/edit")
|
||||||
assert html_response(conn, 200) =~ "Edit Source"
|
assert html_response(conn, 200) =~ "Editing \"#{source.custom_name}\""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ defmodule PinchflatWeb.SourceControllerTest do
|
||||||
invalid_attrs: invalid_attrs
|
invalid_attrs: invalid_attrs
|
||||||
} do
|
} do
|
||||||
conn = put(conn, ~p"/sources/#{source}", source: invalid_attrs)
|
conn = put(conn, ~p"/sources/#{source}", source: invalid_attrs)
|
||||||
assert html_response(conn, 200) =~ "Edit Source"
|
assert html_response(conn, 200) =~ "Editing \"#{source.custom_name}\""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue