1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 23:45:21 +02:00
Maybe/app/views/chats/index.html.erb
Alex Hatzenbuhler b719a8b80d
Add new ai chat button, tweak ai navigation (#2272)
* Add new chat button

* Tweak chat navigation

* Fix chat nav padding on new chat

* Make the button nicer

* Fix bad tailwind class

* Use menu icon instead of left

* Fix path
2025-05-22 11:38:05 -04:00

32 lines
982 B
Text

<div data-controller="chat hotkey">
<%= turbo_frame_tag chat_frame do %>
<div class="flex flex-col h-full md:p-4">
<% if @chats.any? %>
<div class="grow flex flex-col">
<div class="flex items-center justify-between my-6">
<h1 class="text-xl font-medium">Chats</h1>
<%= render LinkComponent.new(
id: "new-chat",
icon: "plus",
variant: "icon",
href: new_chat_path,
frame: chat_frame,
text: "New chat"
) %>
</div>
<div class="space-y-2 px-0.5">
<%= render @chats %>
</div>
</div>
<% else %>
<div class="grow flex flex-col">
<h1 class="sr-only">Chats</h1>
<div class="mt-auto py-8">
<%= render "chats/ai_greeting" %>
</div>
<%= render "messages/chat_form" %>
</div>
<% end %>
</div>
<% end %>
</div>