Improve layout of add record form

Remove results count (I never looked at it)
This commit is contained in:
Claudio Ortolina
2026-04-20 15:31:14 +01:00
parent fd93aaed30
commit d47df899b7
@@ -14,7 +14,6 @@ defmodule MusicLibraryWeb.Components.AddRecord do
use MusicLibraryWeb, :live_component use MusicLibraryWeb, :live_component
import MusicLibraryWeb.RecordComponents, only: [format_label: 1, type_label: 1] import MusicLibraryWeb.RecordComponents, only: [format_label: 1, type_label: 1]
import MusicLibraryWeb.SearchComponents, only: [results_footer: 1]
alias MusicBrainz.ReleaseGroupSearchResult alias MusicBrainz.ReleaseGroupSearchResult
alias MusicLibrary.Records alias MusicLibrary.Records
@@ -29,8 +28,9 @@ defmodule MusicLibraryWeb.Components.AddRecord do
@impl true @impl true
def render(assigns) do def render(assigns) do
~H""" ~H"""
<div>
<div class="grid grid-cols-1 md:grid-cols-5"> <div class="grid grid-cols-1 md:grid-cols-5">
<section class="md:col-span-3 p-4 md:border-r md:border-zinc-200 md:dark:border-zinc-800"> <section class="md:col-span-3 md:p-4 md:border-r md:border-zinc-200 md:dark:border-zinc-800">
<.simple_form <.simple_form
for={@form} for={@form}
id={:import_form} id={:import_form}
@@ -75,15 +75,14 @@ defmodule MusicLibraryWeb.Components.AddRecord do
<div <div
:if={@release_groups_count == 0} :if={@release_groups_count == 0}
id="release-groups-empty" id="release-groups-empty"
class="text-md flex h-32 items-center justify-center text-zinc-500 md:h-64" class="text-md flex h-64 items-center justify-center text-zinc-500 md:h-64"
> >
{gettext("No results")} {gettext("No results")}
</div> </div>
<.results_footer total_results={@release_groups_total_count} />
</section> </section>
<aside class={[ <aside class={[
"md:col-span-2 bg-zinc-50 dark:bg-zinc-900/60", "md:col-span-2",
"border-t md:border-t-0 md:border-l md:border-zinc-200 md:dark:border-zinc-800", "border-t md:border-t-0 md:border-l md:border-zinc-200 md:dark:border-zinc-800",
"flex flex-col" "flex flex-col"
]}> ]}>
@@ -233,6 +232,7 @@ defmodule MusicLibraryWeb.Components.AddRecord do
</div> </div>
</aside> </aside>
</div> </div>
</div>
""" """
end end