mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
* WIP * WIP * WIP * WIP * WIP * WIP * WIP * format * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * fix conflict * fix conflict * chore: run rubocop * fix test * update PWA logo * fix tests * chore: lint * fix test * Refactor: Remove duplicate data attribute in activity partial and add chat form rendering in chats index --------- Co-authored-by: Josh Pigford <josh@joshpigford.com>
31 lines
1.2 KiB
Text
31 lines
1.2 KiB
Text
<%= turbo_frame_tag chat_frame do %>
|
|
<div class="flex flex-col h-full md:p-4">
|
|
<nav class="mb-6">
|
|
<% back_path = @last_viewed_chat ? chat_path(@last_viewed_chat) : new_chat_path %>
|
|
<%= link_to back_path, class: "w-9 h-9 flex items-center justify-center rounded-lg hover:bg-surface-hover" do %>
|
|
<%= icon("arrow-left", color: "gray" ) %>
|
|
<% end %>
|
|
</nav>
|
|
|
|
<div class="grow">
|
|
<h1 class="text-xl font-medium mb-6">Chats</h1>
|
|
|
|
<% if @chats.any? %>
|
|
<div class="space-y-2 px-0.5">
|
|
<%= render @chats %>
|
|
</div>
|
|
<% else %>
|
|
<div class="text-center py-12 bg-container rounded-lg border border-gray-200">
|
|
<div class="w-16 h-16 bg-surface-inset rounded-full flex items-center justify-center mx-auto mb-4">
|
|
<%= icon("message-square", size: "lg") %>
|
|
</div>
|
|
<h3 class="text-lg font-medium text-primary mb-1">No chats yet</h3>
|
|
<p class="text-gray-500 mb-4">Start a new conversation with the AI assistant</p>
|
|
</div>
|
|
<div class="mt-auto p-4">
|
|
<%= render "messages/chat_form", chat: nil %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|