static fe: add remote follow button

This commit is contained in:
William Pitcock 2019-03-03 13:36:59 +00:00 committed by Phil Hagelberg
parent b33fbd58e3
commit ca5ef201ef
3 changed files with 18 additions and 1 deletions

View File

@ -8,6 +8,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEView do
alias Pleroma.User alias Pleroma.User
alias Pleroma.Web.MediaProxy alias Pleroma.Web.MediaProxy
alias Pleroma.Formatter alias Pleroma.Formatter
alias Pleroma.Web.Router.Helpers
import Phoenix.HTML import Phoenix.HTML

View File

@ -70,6 +70,15 @@
text-decoration: none; text-decoration: none;
} }
.pull-right {
float: right;
}
.collapse {
margin: 0;
width: auto;
}
h1 { h1 {
margin: 0; margin: 0;
} }

View File

@ -1,4 +1,11 @@
<h1><%= raw (@data.user.name |> Formatter.emojify(emoji_for_user(@data.user))) %></h1> <h1>
<form class="pull-right collapse" method="POST" action="<%= Helpers.util_path(@conn, :remote_subscribe) %>">
<input type="hidden" name="nickname" value="<%= @data.user.nickname %>">
<input type="hidden" name="profile" value="">
<button type="submit" class="collapse">Remote follow</button>
</form>
<%= raw (@data.user.name |> Formatter.emojify(emoji_for_user(@data.user))) %>
</h1>
<p><%= raw @data.user.bio %></p> <p><%= raw @data.user.bio %></p>
<div class="activity-stream"> <div class="activity-stream">
<%= for activity <- @data.timeline do %> <%= for activity <- @data.timeline do %>