From 715ad6be49a0019c344475fce26f76f7cf6bd68d Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Wed, 20 Aug 2025 19:55:32 +0300 Subject: [PATCH] Use button_group/1 --- .../live/collection_live/index.html.heex | 12 ++++-------- .../online_store_template_live/index.html.heex | 10 ++++------ .../live/scrobble_rules_live/index.html.heex | 6 ++---- .../live/wishlist_live/index.html.heex | 18 ++++++------------ 4 files changed, 16 insertions(+), 30 deletions(-) diff --git a/lib/music_library_web/live/collection_live/index.html.heex b/lib/music_library_web/live/collection_live/index.html.heex index ab033b21..e56b5453 100644 --- a/lib/music_library_web/live/collection_live/index.html.heex +++ b/lib/music_library_web/live/collection_live/index.html.heex @@ -2,9 +2,8 @@
<.search_form query={@record_list_params.query} /> - +
- + <.button_group> <.button patch={order_path(@record_list_params, :purchase)} size="sm" class={[ - "rounded-l-md rounded-r-none", @record_list_params.order == :purchase && "!bg-zinc-100 dark:!bg-zinc-700" ]} > @@ -47,14 +44,13 @@ patch={order_path(@record_list_params, :alphabetical)} size="sm" class={[ - "-ml-px rounded-r-md rounded-l-none", @record_list_params.order == :alphabetical && "!bg-zinc-100 dark:!bg-zinc-700" ]} > <.icon name="hero-user-solid" class="mr-1 h-4 w-4" aria-hidden="true" data-slot="icon" /> {gettext("A->Z")} - +
diff --git a/lib/music_library_web/live/online_store_template_live/index.html.heex b/lib/music_library_web/live/online_store_template_live/index.html.heex index c1ea6837..5797eab4 100644 --- a/lib/music_library_web/live/online_store_template_live/index.html.heex +++ b/lib/music_library_web/live/online_store_template_live/index.html.heex @@ -6,12 +6,10 @@
- + <.button variant="solid" size="sm" patch={~p"/online-store-templates/new"}> + <.icon name="hero-plus" class="h-4 w-4 mr-2" aria-hidden="true" data-slot="icon" /> + {gettext("New Template")} +
diff --git a/lib/music_library_web/live/scrobble_rules_live/index.html.heex b/lib/music_library_web/live/scrobble_rules_live/index.html.heex index 25d7d619..269e39a6 100644 --- a/lib/music_library_web/live/scrobble_rules_live/index.html.heex +++ b/lib/music_library_web/live/scrobble_rules_live/index.html.heex @@ -6,9 +6,8 @@
- +
diff --git a/lib/music_library_web/live/wishlist_live/index.html.heex b/lib/music_library_web/live/wishlist_live/index.html.heex index c93da5b5..cb14d78d 100644 --- a/lib/music_library_web/live/wishlist_live/index.html.heex +++ b/lib/music_library_web/live/wishlist_live/index.html.heex @@ -2,25 +2,19 @@
<.search_form query={@record_list_params.query} /> - <.link - class={[ - "relative inline-flex items-center rounded-md", - "px-3 py-2 text-xs sm:text-sm font-semibold", - "bg-zinc-900 hover:bg-zinc-800 dark:bg-zinc-100 dark:hover:bg-zinc-200", - "disabled:bg-zinc-300 dark:disabled:bg-zinc-300 disabled:active:text-white", - "text-white active:text-white/80 dark:text-zinc-900 dark:active:text-zinc-900/80", - "focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-zinc-600" - ]} + <.button + variant="solid" + size="sm" patch={~p"/wishlist/import"} > <.icon name="hero-plus" class="h-4 w-4 mr-2" aria-hidden="true" data-slot="icon" /> {gettext("Add")} - +
- + <.button_group> <.button patch={order_path(@record_list_params, :insertion)} size="sm" @@ -43,7 +37,7 @@ <.icon name="hero-user-solid" class="mr-1 h-4 w-4" aria-hidden="true" data-slot="icon" /> {gettext("A->Z")} - +