Simplify record detail title + actions

This commit is contained in:
Claudio Ortolina
2025-10-16 20:45:53 +01:00
parent 31683af4f4
commit 74513301b1
2 changed files with 33 additions and 33 deletions
@@ -9,23 +9,10 @@
<div class="grow">
<div class="mt-4 md:mt-0 flex justify-between">
<div>
<h1 class="text-base font-medium leading-6 text-zinc-700">
<.artist_links joinphrase_class="text-sm" artists={@record.artists} />
</h1>
<h2 class="mt-1 flex font-semibold text-lg md:text-2xl text-zinc-700 dark:text-zinc-300 text-wrap">
{@record.title}
</h2>
<p class="mt-2 flex items-center text-sm text-zinc-500 dark:text-zinc-400">
<.record_colors record={@record} />
<span class="ml-1">
{Records.Record.format_release_date(@record.release_date)} · {format_label(
@record.format
)} · {type_label(@record.type)}
</span>
</p>
</div>
<div class="min-w-12 text-right">
<h1 class="text-base font-medium leading-6 text-zinc-700">
<.artist_links joinphrase_class="text-sm" artists={@record.artists} />
</h1>
<div class="min-w-12 border-0 space-x-2 md:space-x-0">
<button
class="text-xs md:text-sm text-zinc-700 dark:text-zinc-300"
phx-click={MusicLibraryWeb.Components.Notes.open("record-notes-sheet")}
@@ -159,6 +146,19 @@
</.dropdown>
</div>
</div>
<div>
<h2 class="mt-1 flex font-semibold text-lg md:text-2xl text-zinc-700 dark:text-zinc-300 text-wrap">
{@record.title}
</h2>
<p class="mt-2 flex items-center text-sm text-zinc-500 dark:text-zinc-400">
<.record_colors record={@record} />
<span class="ml-1">
{Records.Record.format_release_date(@record.release_date)} · {format_label(
@record.format
)} · {type_label(@record.type)}
</span>
</p>
</div>
<div class="mt-4 md:mt-8">
<%!-- TODO: replace with OSS version --%>
<dl class="divide-y divide-zinc-100 dark:divide-slate-300/30">
@@ -9,22 +9,9 @@
<div class="grow">
<div class="mt-4 md:mt-0 flex justify-between">
<div class="min-w-12">
<h1 class="text-base font-medium leading-6 text-zinc-700">
<.artist_links joinphrase_class="text-sm" artists={@record.artists} />
</h1>
<h2 class="mt-1 flex font-semibold text-lg md:text-2xl text-zinc-700 dark:text-zinc-300 text-wrap">
{@record.title}
</h2>
<p class="flex items-center mt-2 text-sm text-zinc-500 dark:text-zinc-400">
<.record_colors record={@record} />
{Records.Record.format_release_date(@record.release_date)}
<span :if={@current_date && !Records.Record.released?(@record, @current_date)}>
({gettext("Unreleased")})
</span>
· {format_label(@record.format)} · {type_label(@record.type)}
</p>
</div>
<h1 class="text-base font-medium leading-6 text-zinc-700">
<.artist_links joinphrase_class="text-sm" artists={@record.artists} />
</h1>
<.dropdown id={"actions-#{@record.id}"} placement="bottom-end">
<:toggle class="h-5 block">
<span class="sr-only">{gettext("Actions")}</span>
@@ -149,6 +136,19 @@
</.focus_wrap>
</.dropdown>
</div>
<div>
<h2 class="mt-1 flex font-semibold text-lg md:text-2xl text-zinc-700 dark:text-zinc-300 text-wrap">
{@record.title}
</h2>
<p class="flex items-center mt-2 text-sm text-zinc-500 dark:text-zinc-400">
<.record_colors record={@record} />
{Records.Record.format_release_date(@record.release_date)}
<span :if={@current_date && !Records.Record.released?(@record, @current_date)}>
({gettext("Unreleased")})
</span>
· {format_label(@record.format)} · {type_label(@record.type)}
</p>
</div>
<div class="mt-4 md:mt-8">
<%!-- TODO: replace with OSS version --%>