Browse Source

Don't show reply form unless logged in

master
Shadowfacts 1 year ago
parent
commit
4c9adb3336
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
1 changed files with 8 additions and 6 deletions
  1. +8
    -6
      lib/clacks_web/templates/frontend/status.html.eex

+ 8
- 6
lib/clacks_web/templates/frontend/status.html.eex View File

@ -1,10 +1,12 @@
<%= render "_status.html", conn: @conn, author: @author, status: @status, note: @status.data["object"] %>
<hr>
<%= form_tag Routes.frontend_path(@conn, :post_status), method: :post, class: "compose-status" do %>
<input type="hidden" name="in_reply_to" value="<%= @status.data["object"]["id"] %>">
<textarea id="content" name="content" rows="5" placeholder="Reply" required><%= mentions_for_replying_to(@conn, @status) %></textarea>
<%= submit "Post" %>
<%= unless is_nil(@current_user) do %>
<hr>
<%= form_tag Routes.frontend_path(@conn, :post_status), method: :post, class: "compose-status" do %>
<input type="hidden" name="in_reply_to" value="<%= @status.data["object"]["id"] %>">
<textarea id="content" name="content" rows="5" placeholder="Reply" required><%= mentions_for_replying_to(@conn, @status) %></textarea>
<%= submit "Post" %>
<hr>
<% end %>
<% end %>

Loading…
Cancel
Save