2019-10-06 23:41:18 +00:00
|
|
|
<h1><%= @actor.data["preferredUsername"] %></h1>
|
2020-04-26 18:45:51 +00:00
|
|
|
<h2>
|
|
|
|
<%= if @actor.local do %>
|
|
|
|
<%= display_username(@actor) %>
|
|
|
|
<% else %>
|
|
|
|
<a href="<%= @actor.ap_id %>">
|
|
|
|
<%= display_username(@actor) %>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
</h2>
|
2019-10-06 23:41:18 +00:00
|
|
|
<p><%= @actor.data["summary"] %></p>
|
|
|
|
|
2020-04-26 22:55:44 +00:00
|
|
|
<div class="actor-actions">
|
|
|
|
<%= unless @current_user.actor.ap_id == @actor.ap_id do %>
|
|
|
|
|
|
|
|
<%= case @following_state do %>
|
|
|
|
<% :not_following -> %>
|
|
|
|
<%= form_tag Routes.frontend_path(@conn, :follow, @actor.id), method: :post, class: "follow-form" do %>
|
|
|
|
<%= submit "Follow" %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% :following -> %>
|
|
|
|
<%= form_tag Routes.frontend_path(@conn, :unfollow, @actor.id), method: :post, class: "follow-form" do %>
|
|
|
|
<%= submit "Unfollow" %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% :pending -> %>
|
|
|
|
<!-- todo: cancel follow request -->
|
|
|
|
<button type="button">Pending</button>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2020-04-25 16:30:47 +00:00
|
|
|
<%= render "_timeline.html", conn: @conn, statuses_with_authors: Enum.map(@statuses, &({&1, @actor})) %>
|