diff --git a/lib/music_library_web/components/chat.ex b/lib/music_library_web/components/chat.ex
index 6aa4662c..d1e758fc 100644
--- a/lib/music_library_web/components/chat.ex
+++ b/lib/music_library_web/components/chat.ex
@@ -67,6 +67,7 @@ defmodule MusicLibraryWeb.Components.Chat do
id={@sheet_id}
placement="right"
class="w-md sm:min-w-lg lg:min-w-2xl flex flex-col h-full"
+ hide_close_button
>
<%= if @view == :list do %>
{render_list_view(assigns)}
@@ -102,10 +103,20 @@ defmodule MusicLibraryWeb.Components.Chat do
{gettext("Chat history")}
- <.button size="sm" variant="soft" phx-click="new_chat" phx-target={@myself}>
- <.icon name="hero-plus" class="icon" data-slot="icon" />
- {gettext("New chat")}
-
+
+ <.button size="sm" variant="soft" phx-click="new_chat" phx-target={@myself}>
+ <.icon name="hero-plus" class="icon" data-slot="icon" />
+ {gettext("New chat")}
+
+ <.button
+ size="icon-sm"
+ variant="ghost"
+ phx-click={Fluxon.close_dialog(@sheet_id)}
+ aria-label={gettext("Close")}
+ >
+ <.icon name="hero-x-mark" class="icon" />
+
+
@@ -157,7 +168,7 @@ defmodule MusicLibraryWeb.Components.Chat do
defp render_active_view(assigns) do
~H"""
-
+
{gettext("Chat about %{title}", title: @title)}
<.button
@@ -180,6 +191,14 @@ defmodule MusicLibraryWeb.Components.Chat do
>
<.icon name="hero-plus" class="icon" />
+ <.button
+ size="icon-sm"
+ variant="ghost"
+ phx-click={Fluxon.close_dialog(@sheet_id)}
+ aria-label={gettext("Close")}
+ >
+ <.icon name="hero-x-mark" class="icon" />
+