Fix overlapping buttons in chat
This commit is contained in:
@@ -67,6 +67,7 @@ defmodule MusicLibraryWeb.Components.Chat do
|
|||||||
id={@sheet_id}
|
id={@sheet_id}
|
||||||
placement="right"
|
placement="right"
|
||||||
class="w-md sm:min-w-lg lg:min-w-2xl flex flex-col h-full"
|
class="w-md sm:min-w-lg lg:min-w-2xl flex flex-col h-full"
|
||||||
|
hide_close_button
|
||||||
>
|
>
|
||||||
<%= if @view == :list do %>
|
<%= if @view == :list do %>
|
||||||
{render_list_view(assigns)}
|
{render_list_view(assigns)}
|
||||||
@@ -102,10 +103,20 @@ defmodule MusicLibraryWeb.Components.Chat do
|
|||||||
<h2 class="text-lg font-semibold text-zinc-900 dark:text-zinc-100">
|
<h2 class="text-lg font-semibold text-zinc-900 dark:text-zinc-100">
|
||||||
{gettext("Chat history")}
|
{gettext("Chat history")}
|
||||||
</h2>
|
</h2>
|
||||||
<.button size="sm" variant="soft" phx-click="new_chat" phx-target={@myself}>
|
<div class="flex items-center gap-2">
|
||||||
<.icon name="hero-plus" class="icon" data-slot="icon" />
|
<.button size="sm" variant="soft" phx-click="new_chat" phx-target={@myself}>
|
||||||
{gettext("New chat")}
|
<.icon name="hero-plus" class="icon" data-slot="icon" />
|
||||||
</.button>
|
{gettext("New chat")}
|
||||||
|
</.button>
|
||||||
|
<.button
|
||||||
|
size="icon-sm"
|
||||||
|
variant="ghost"
|
||||||
|
phx-click={Fluxon.close_dialog(@sheet_id)}
|
||||||
|
aria-label={gettext("Close")}
|
||||||
|
>
|
||||||
|
<.icon name="hero-x-mark" class="icon" />
|
||||||
|
</.button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 overflow-y-auto py-4">
|
<div class="flex-1 overflow-y-auto py-4">
|
||||||
@@ -157,7 +168,7 @@ defmodule MusicLibraryWeb.Components.Chat do
|
|||||||
defp render_active_view(assigns) do
|
defp render_active_view(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="flex items-center gap-2 pb-4 border-b border-zinc-200 dark:border-zinc-700">
|
<div class="flex items-center gap-2 pb-4 border-b border-zinc-200 dark:border-zinc-700">
|
||||||
<h2 class="text-lg font-semibold text-zinc-900 dark:text-zinc-100">
|
<h2 class="text-lg font-semibold text-zinc-900 dark:text-zinc-100 flex-1">
|
||||||
{gettext("Chat about %{title}", title: @title)}
|
{gettext("Chat about %{title}", title: @title)}
|
||||||
</h2>
|
</h2>
|
||||||
<.button
|
<.button
|
||||||
@@ -180,6 +191,14 @@ defmodule MusicLibraryWeb.Components.Chat do
|
|||||||
>
|
>
|
||||||
<.icon name="hero-plus" class="icon" />
|
<.icon name="hero-plus" class="icon" />
|
||||||
</.button>
|
</.button>
|
||||||
|
<.button
|
||||||
|
size="icon-sm"
|
||||||
|
variant="ghost"
|
||||||
|
phx-click={Fluxon.close_dialog(@sheet_id)}
|
||||||
|
aria-label={gettext("Close")}
|
||||||
|
>
|
||||||
|
<.icon name="hero-x-mark" class="icon" />
|
||||||
|
</.button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1053,6 +1053,7 @@ msgid_plural "%{count} results"
|
|||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
|
#: lib/music_library_web/components/chat.ex
|
||||||
#: lib/music_library_web/components/search_components.ex
|
#: lib/music_library_web/components/search_components.ex
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
|
|||||||
@@ -1053,6 +1053,7 @@ msgid_plural "%{count} results"
|
|||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
|
#: lib/music_library_web/components/chat.ex
|
||||||
#: lib/music_library_web/components/search_components.ex
|
#: lib/music_library_web/components/search_components.ex
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
|
|||||||
Reference in New Issue
Block a user