44 lines
1.5 KiB
Elixir
44 lines
1.5 KiB
Elixir
<% past_tense =
|
|
case @action do
|
|
:like -> "Liked"
|
|
:announce -> "Announced"
|
|
end
|
|
%>
|
|
|
|
<div class="<%= assigns[:class] || "status" %>">
|
|
<div class="status-meta">
|
|
<p class="status-announcer">
|
|
<%= past_tense %> by <a href="<%= local_actor_link(@action_actor) %>"><%= @action_actor.data["preferredUsername"] %></a>
|
|
</p>
|
|
<p class="status-meta-right">
|
|
<time datetime="<%= iso_datetime(@action_activity) %>"><%= display_timestamp(@action_activity) %></time>
|
|
</p>
|
|
</div>
|
|
<div class="status-meta">
|
|
<h2 class="status-author-nickname">
|
|
<a href="<%= local_actor_link(@original_actor) %>">
|
|
<%= @original_actor.data["preferredUsername"] %>
|
|
</a>
|
|
</h2>
|
|
<h3 class="status-author-username">
|
|
<a href="<%= @original_actor.ap_id %>">
|
|
<%= display_username(@original_actor) %>
|
|
</a>
|
|
</h3>
|
|
<p class="status-meta-right">
|
|
<time datetime="<%= iso_datetime(@original_activity) %>"><%= display_timestamp(@original_activity) %></time>
|
|
<a href="<%= @original_note["url"] || @original_note["id"] %>" class="status-permalink">Permalink</a>
|
|
</p>
|
|
</div>
|
|
<div class="status-content">
|
|
<%= unless is_nil(@conn.assigns[:user]) do %>
|
|
<%= render_status_content(@original_activity) %>
|
|
<% else %>
|
|
<%= raw(@original_note["content"]) %>
|
|
<% end %>
|
|
</div>
|
|
<div class="status-actions">
|
|
<a href="<%= Routes.frontend_path(@conn, :reply, @original_activity.id) %>">Reply</a>
|
|
</div>
|
|
</div>
|