Improve public account cards (#6559)

- Add follow/unfollow/remote follow buttons
- Format the bio properly
- Always show username@domain, even for local accounts
This commit is contained in:
Eugen Rochko
2018-02-26 16:18:41 +01:00
committed by GitHub
parent c33931b613
commit 18513a978a
6 changed files with 73 additions and 51 deletions

View File

@ -7,7 +7,9 @@ class FollowerAccountsController < ApplicationController
@follows = Follow.where(target_account: @account).recent.page(params[:page]).per(FOLLOW_PER_PAGE).preload(:account)
respond_to do |format|
format.html
format.html do
@relationships = AccountRelationshipsPresenter.new(@follows.map(&:account_id), current_user.account_id) if user_signed_in?
end
format.json do
render json: collection_presenter,

View File

@ -7,7 +7,9 @@ class FollowingAccountsController < ApplicationController
@follows = Follow.where(account: @account).recent.page(params[:page]).per(FOLLOW_PER_PAGE).preload(:target_account)
respond_to do |format|
format.html
format.html do
@relationships = AccountRelationshipsPresenter.new(@follows.map(&:target_account_id), current_user.account_id) if user_signed_in?
end
format.json do
render json: collection_presenter,