Display more metadata for record set items
This commit is contained in:
@@ -3,9 +3,9 @@ defmodule MusicLibraryWeb.RecordSetLive.Index do
|
|||||||
|
|
||||||
import MusicLibraryWeb.Components.Pagination
|
import MusicLibraryWeb.Components.Pagination
|
||||||
import MusicLibraryWeb.LiveHelpers.Params
|
import MusicLibraryWeb.LiveHelpers.Params
|
||||||
import MusicLibraryWeb.RecordComponents, only: [artist_links: 1]
|
import MusicLibraryWeb.RecordComponents, only: [artist_links: 1, type_label: 1, format_label: 1]
|
||||||
|
|
||||||
alias MusicLibrary.RecordSets
|
alias MusicLibrary.{Records, RecordSets}
|
||||||
alias MusicLibrary.RecordSets.RecordSet
|
alias MusicLibrary.RecordSets.RecordSet
|
||||||
alias MusicLibraryWeb.Markdown
|
alias MusicLibraryWeb.Markdown
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,18 @@
|
|||||||
<h2 class="flex font-semibold text-xs sm:text-sm leading-5 text-zinc-700 dark:text-zinc-300 text-wrap">
|
<h2 class="flex font-semibold text-xs sm:text-sm leading-5 text-zinc-700 dark:text-zinc-300 text-wrap">
|
||||||
{item.record.title}
|
{item.record.title}
|
||||||
</h2>
|
</h2>
|
||||||
|
<p class="pointer-events-none block text-sm font-medium text-zinc-500">
|
||||||
|
{format_label(item.record.format)} · {type_label(item.record.type)}
|
||||||
|
</p>
|
||||||
|
<p class="pointer-events-none block text-sm font-medium text-zinc-500">
|
||||||
|
<.icon
|
||||||
|
name="hero-calendar-days"
|
||||||
|
class="-mt-1 h-4 w-4"
|
||||||
|
aria-hidden="true"
|
||||||
|
data-slot="icon"
|
||||||
|
/>
|
||||||
|
{Records.Record.format_release_date(item.record.release_date)}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.link
|
<.link
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
defmodule MusicLibraryWeb.RecordSetLive.Show do
|
defmodule MusicLibraryWeb.RecordSetLive.Show do
|
||||||
use MusicLibraryWeb, :live_view
|
use MusicLibraryWeb, :live_view
|
||||||
|
|
||||||
import MusicLibraryWeb.RecordComponents, only: [artist_links: 1]
|
import MusicLibraryWeb.RecordComponents, only: [artist_links: 1, type_label: 1, format_label: 1]
|
||||||
|
|
||||||
alias MusicLibrary.RecordSets
|
alias MusicLibrary.{Records, RecordSets}
|
||||||
alias MusicLibrary.RecordSets.RecordSet
|
alias MusicLibrary.RecordSets.RecordSet
|
||||||
alias MusicLibraryWeb.Markdown
|
alias MusicLibraryWeb.Markdown
|
||||||
alias Phoenix.LiveView.JS
|
alias Phoenix.LiveView.JS
|
||||||
|
|||||||
@@ -163,6 +163,18 @@
|
|||||||
<h2 class="flex font-semibold text-xs sm:text-sm leading-5 text-zinc-700 dark:text-zinc-300 text-wrap">
|
<h2 class="flex font-semibold text-xs sm:text-sm leading-5 text-zinc-700 dark:text-zinc-300 text-wrap">
|
||||||
{item.record.title}
|
{item.record.title}
|
||||||
</h2>
|
</h2>
|
||||||
|
<p class="pointer-events-none block text-sm font-medium text-zinc-500">
|
||||||
|
{format_label(item.record.format)} · {type_label(item.record.type)}
|
||||||
|
</p>
|
||||||
|
<p class="pointer-events-none block text-sm font-medium text-zinc-500">
|
||||||
|
<.icon
|
||||||
|
name="hero-calendar-days"
|
||||||
|
class="-mt-1 h-4 w-4"
|
||||||
|
aria-hidden="true"
|
||||||
|
data-slot="icon"
|
||||||
|
/>
|
||||||
|
{Records.Record.format_release_date(item.record.release_date)}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user