about summary refs log tree commit diff
path: root/app/views/accounts/_moved_strip.html.haml
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-11-18 19:39:02 +0100
committerGitHub <noreply@github.com>2017-11-18 19:39:02 +0100
commit58cede4808baa4db6cc143b80ef23e8179a8415b (patch)
treeacaac099fc46d9293768f9fa70c1d1826d06d7e8 /app/views/accounts/_moved_strip.html.haml
parent6be72a3ec6d87af4de245b96fea45191ac01114e (diff)
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
Diffstat (limited to 'app/views/accounts/_moved_strip.html.haml')
-rw-r--r--app/views/accounts/_moved_strip.html.haml17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/views/accounts/_moved_strip.html.haml b/app/views/accounts/_moved_strip.html.haml
new file mode 100644
index 000000000..6a14a5dd3
--- /dev/null
+++ b/app/views/accounts/_moved_strip.html.haml
@@ -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}