diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-02-26 16:18:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 16:18:41 +0100 |
commit | 18513a978aecd36bf61a5cd7dba08f9f20729de9 (patch) | |
tree | 3b27029bf1fde622ab77607c2159428d9c2ceb13 /app/controllers | |
parent | c33931b613c7da4cc2c22ff8411c38556dc579cb (diff) |
Improve public account cards (#6559)
- Add follow/unfollow/remote follow buttons - Format the bio properly - Always show username@domain, even for local accounts
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/follower_accounts_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/following_accounts_controller.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/follower_accounts_controller.rb b/app/controllers/follower_accounts_controller.rb index 399e79665..2d2315034 100644 --- a/app/controllers/follower_accounts_controller.rb +++ b/app/controllers/follower_accounts_controller.rb @@ -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, diff --git a/app/controllers/following_accounts_controller.rb b/app/controllers/following_accounts_controller.rb index 1e73d4bd4..169f9057d 100644 --- a/app/controllers/following_accounts_controller.rb +++ b/app/controllers/following_accounts_controller.rb @@ -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, |