mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
Tweak chat navigation
This commit is contained in:
parent
ead44ad8a1
commit
319eba79ac
2 changed files with 10 additions and 20 deletions
|
@ -7,8 +7,9 @@
|
|||
<%= render LinkComponent.new(
|
||||
id: "chat-nav-back",
|
||||
variant: "icon",
|
||||
icon: "menu",
|
||||
href: path,
|
||||
icon: "arrow-left",
|
||||
href: chats_path,
|
||||
frame: chat_frame
|
||||
) %>
|
||||
|
||||
<div class="grow">
|
||||
|
|
|
@ -2,20 +2,8 @@
|
|||
<%= turbo_frame_tag chat_frame do %>
|
||||
<div class="flex flex-col h-full md:p-4">
|
||||
<% if @chats.any? %>
|
||||
<nav class="mb-6">
|
||||
<% back_path = @last_viewed_chat ? chat_path(@last_viewed_chat) : new_chat_path %>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
variant: "icon",
|
||||
icon: "arrow-left",
|
||||
href: back_path,
|
||||
) %>
|
||||
</nav>
|
||||
<% end %>
|
||||
|
||||
<div class="grow flex flex-col">
|
||||
<% if @chats.any? %>
|
||||
<h1 class="text-xl font-medium mb-6">Chats</h1>
|
||||
<div class="grow flex flex-col">
|
||||
<h1 class="text-xl font-medium my-6">Chats</h1>
|
||||
<div class="mb-4">
|
||||
<%= render LinkComponent.new(
|
||||
text: "New chat",
|
||||
|
@ -29,15 +17,16 @@
|
|||
<div class="space-y-2 px-0.5">
|
||||
<%= render @chats %>
|
||||
</div>
|
||||
<% else %>
|
||||
</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" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue