1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-18 20:59:39 +02:00
Maybe/app/views/chats/_chat.html.erb
Zach Gollwitzer 9fabcf4c72
Redis check for self hosted apps (#2353)
* Redis check for self hosted apps

* Run linter with autocorrect

* Add Redis to CI
2025-06-09 18:30:52 -04:00

30 lines
883 B
Text

<%# locals: (chat:) %>
<%= tag.div class: "flex items-center justify-between px-4 py-3 bg-container shadow-border-xs rounded-lg" do %>
<div class="grow">
<%= turbo_frame_tag dom_id(chat, :title) do %>
<%= render "chats/chat_title", chat: chat, ctx: "list" %>
<% end %>
<p class="text-sm text-secondary">
<%= time_ago_in_words(chat.updated_at) %> ago
</p>
</div>
<%= render MenuComponent.new(icon_vertical: true) do |menu| %>
<% menu.with_item(
variant: "link",
text: "Edit chat title",
href: edit_chat_path(chat, ctx: "list"),
icon: "pencil",
frame: dom_id(chat, "title")) %>
<% menu.with_item(
variant: "button",
text: "Delete chat",
href: chat_path(chat),
icon: "trash-2",
method: :delete,
confirm: CustomConfirm.for_resource_deletion("chat")) %>
<% end %>
<% end %>