summaryrefslogtreecommitdiff
path: root/app/views/checkpoints/_checkpoint.html.erb
blob: a8d70d80edfb02149a1d6fd9746885bb88fdbc7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<div class="border-l border-orange-900 p-2">
  <div class="flex flex-col">
    <div class="flex space-x-2 text-sm">
      <div>
        <% case checkpoint.kind.to_sym %>
        <% when :comment %>
          💬
        <% when :checkin %>
          📬
        <% when :checkout %>
          📭
        <% else %>
          <%# Should never happen. %>
        <% end %>
      </div>
      <div class="flex space-x-2">
        <span class="uppercase"><%= checkpoint.kind %></span>
        <% if checkpoint.save_file.attached? %>
          <%= link_to "Download save file", rails_blob_path(checkpoint.save_file, disposition: "attachment") %>
        <% end %>
      </div>

    </div>
    <div>
    </div>
    <div class="text-sm">
      <%= time_ago_in_words(checkpoint.created_at) %> ago by
      <%= link_to checkpoint.user.name || "???", user_path(checkpoint.user) %>
      <span>@ <%= checkpoint.created_at %></span>
    </div>
    <% if checkpoint.comment %>
      <div class="text-lg"><%= checkpoint.comment %></div>
    <% end %>
  </div>
</div>