Profile redirect notes (#5746)
* Serialize moved accounts into REST and ActivityPub APIs * Parse federated moved accounts from ActivityPub * Add note about moved accounts to public profiles * Add moved account message to web UI * Fix code style issues
This commit is contained in:
parent
6be72a3ec6
commit
58cede4808
18 changed files with 238 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
.card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
|
||||
.card__illustration
|
||||
- unless account.memorial?
|
||||
- unless account.memorial? || account.moved?
|
||||
- if user_signed_in? && current_account.id != account.id && !current_account.requested?(account)
|
||||
.controls
|
||||
- if current_account.following?(account)
|
||||
|
|
17
app/views/accounts/_moved_strip.html.haml
Normal file
17
app/views/accounts/_moved_strip.html.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- moved_to_account = account.moved_to_account
|
||||
|
||||
.moved-strip
|
||||
.moved-strip__message
|
||||
= fa_icon 'suitcase'
|
||||
= t('accounts.moved_html', name: content_tag(:strong, display_name(account), class: :emojify), new_profile_link: link_to(content_tag(:strong, safe_join(['@', content_tag(:span, moved_to_account.acct)])), TagManager.instance.url_for(moved_to_account), class: 'mention'))
|
||||
|
||||
.moved-strip__card
|
||||
= link_to TagManager.instance.url_for(moved_to_account), class: 'detailed-status__display-name p-author h-card', target: '_blank', rel: 'noopener' do
|
||||
.detailed-status__display-avatar
|
||||
.account__avatar-overlay
|
||||
.account__avatar-overlay-base{ style: "background-image: url('#{moved_to_account.avatar.url(:original)}')" }
|
||||
.account__avatar-overlay-overlay{ style: "background-image: url('#{account.avatar.url(:original)}')" }
|
||||
|
||||
%span.display-name
|
||||
%strong.emojify= display_name(moved_to_account)
|
||||
%span @#{moved_to_account.acct}
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
- if @account.memorial?
|
||||
.memoriam-strip= t('in_memoriam_html')
|
||||
- elsif @account.moved?
|
||||
= render partial: 'moved_strip', locals: { account: @account }
|
||||
- elsif show_landing_strip?
|
||||
= render partial: 'shared/landing_strip', locals: { account: @account }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue