Sha256: 1c34bbbe98d9864ae1971e3f539bc7c5a7250f9dfb72b385c433ea39f331872b

Contents?: true

Size: 1.38 KB

Versions: 114

Compression:

Stored size: 1.38 KB

Contents

<% new_message ||= false %>
<% current_user_message = message.membership.user == current_user %>
<% avatar = capture do %>
  <img src="<%= membership_profile_photo_url(message.membership) %>" title="<%= message.membership.name %>" alt="<%= message.membership.name %>" class="w-10 h-10 rounded-full <%= current_user_message ? 'order-2' : 'order-1' %>">
<% end %>

<div class="flex py-3 px-2  text-slate-700 <%= message.reply? ? 'border w-full bg-slate-50 rounded-md' : 'border-b' %> <%= 'opacity-30' if new_message %>">
  <div class="mr-3 min-w-max"><%= avatar %></div>
  <div class="flex flex-col w-full">
    <div class=""><span class="uppercase font-bold text-slate-500"><%= message.user.name %></span><span class="font-extralight text-xs text-slate-400"> &bull; <%= t("global.time_ago", time: time_ago_in_words(message.created_at)) %>
</span></div>
    <div class="py-2"><%= trix_sanitize message.body %></div>
    <% if message.replies.any? %>
      <div class="space-y-2 mt-2 mb-2">
        <% message.replies.oldest.each do |reply| %>
          <%= render 'account/shared/comment', message: reply %>
        <% end %>
      </div>
    <% end %>
    <% unless message.reply? %>
      <%= turbo_frame_tag "reply_#{message.id}" do %>
        <%= link_to "Reply", [:reply, :account, message], class: "font-light text-sm text-slate-400 hover:text-slate-500 pt-2" %>
      <% end %>
    <% end %>
  </div>

</div>

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.14.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.13.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.12.3 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.12.2 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.12.1 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.12.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.11.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.10.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.9.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.8.5 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.8.4 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.8.3 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.8.2 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.8.1 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.8.0 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.7.23 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.7.22 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.7.21 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.7.20 app/views/themes/light/conversations/_comment.html.erb
bullet_train-themes-light-1.7.19 app/views/themes/light/conversations/_comment.html.erb