From 547195e4554e1431bc888acc87e4cdde3d5e809a Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Mon, 30 Sep 2024 09:40:26 +0100 Subject: [PATCH] Improve show record interface Use a single column layout on mobile, with centered buttons. --- .../components/core_components.ex | 7 +++++-- .../live/record_live/show.html.heex | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/music_library_web/components/core_components.ex b/lib/music_library_web/components/core_components.ex index 829683a5..cbb1efb5 100644 --- a/lib/music_library_web/components/core_components.ex +++ b/lib/music_library_web/components/core_components.ex @@ -427,7 +427,10 @@ defmodule MusicLibraryWeb.CoreComponents do def header(assigns) do ~H""" -
+

<%= render_slot(@inner_block) %> @@ -436,7 +439,7 @@ defmodule MusicLibraryWeb.CoreComponents do <%= render_slot(@subtitle) %>

-
<%= render_slot(@actions) %>
+
<%= render_slot(@actions) %>
""" end diff --git a/lib/music_library_web/live/record_live/show.html.heex b/lib/music_library_web/live/record_live/show.html.heex index 64704c0d..35b51e7a 100644 --- a/lib/music_library_web/live/record_live/show.html.heex +++ b/lib/music_library_web/live/record_live/show.html.heex @@ -11,9 +11,9 @@ -
- - {@record.title} +
+ + {@record.title} <%= Records.Record.format_short_label(@record.format) %> @@ -23,11 +23,18 @@ <:item title="Type"><%= @record.type %> <:item title="Musicbrainz ID"> - <%= @record.musicbrainz_id %> + <%= @record.musicbrainz_id %> <:item title="Year"><%= @record.year %> - <:item title="Genres"><%= Enum.join(@record.genres, ", ") %> + <:item title="Genres"> + + <%= genre %> + +