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"}>
|
||||
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
||||
</.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 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" />
|
||||
</.link>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<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">
|
||||
<span class="hidden sm:inline">Search </span>Results for "<%= StringUtils.truncate(@search_term, 50) %>"
|
||||
Results for "<%= StringUtils.truncate(@search_term, 50) %>"
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<%= if match?([_|_], @search_results) do %>
|
||||
<.table rows={@search_results} table_class="text-black dark:text-white">
|
||||
<:col :let={result} label="Title">
|
||||
<%= StringUtils.truncate(result.title, 40) %>
|
||||
<%= result.title %>
|
||||
</:col>
|
||||
<:col :let={result} label="Excerpt">
|
||||
<.highlight_search_terms text={result.matching_search_term} />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
<.link href={~p"/sources"}>
|
||||
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
|
||||
</.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 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" />
|
||||
</.link>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ defmodule PinchflatWeb.MediaProfileControllerTest do
|
|||
media_profile: media_profile
|
||||
} do
|
||||
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
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ defmodule PinchflatWeb.MediaProfileControllerTest 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)
|
||||
assert html_response(conn, 200) =~ "Edit Media Profile"
|
||||
assert html_response(conn, 200) =~ "Editing \"#{media_profile.name}\""
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ defmodule PinchflatWeb.SourceControllerTest do
|
|||
|
||||
test "renders form for editing chosen source", %{conn: conn, source: source} do
|
||||
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
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ defmodule PinchflatWeb.SourceControllerTest do
|
|||
invalid_attrs: invalid_attrs
|
||||
} do
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue