You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.3 KiB

  1. - relationships ||= nil
  2. - unless account.memorial? || account.moved?
  3. - if user_signed_in?
  4. - requested = relationships ? relationships.requested[account.id].present? : current_account.requested?(account)
  5. - following = relationships ? relationships.following[account.id].present? : current_account.following?(account)
  6. - if user_signed_in? && current_account.id != account.id && !requested
  7. .controls
  8. - if following
  9. = link_to (account.local? ? account_unfollow_path(account) : remote_unfollow_path(acct: account.acct)), data: { method: :post }, class: 'icon-button' do
  10. = fa_icon 'user-times'
  11. = t('accounts.unfollow')
  12. - else
  13. = link_to (account.local? ? account_follow_path(account) : authorize_follow_path(acct: account.acct)), data: { method: :post }, class: 'icon-button' do
  14. = fa_icon 'user-plus'
  15. = t('accounts.follow')
  16. - elsif user_signed_in? && current_account.id == account.id
  17. .controls
  18. = link_to settings_profile_url, class: 'icon-button' do
  19. = fa_icon 'pencil'
  20. = t('settings.edit_profile')
  21. - elsif !user_signed_in?
  22. .controls
  23. .remote-follow
  24. = link_to (account.local? ? account_remote_follow_path(account) : "web+mastodon://follow?uri=#{account.uri}"), class: 'icon-button' do
  25. = fa_icon 'user-plus'
  26. = t('accounts.remote_follow')