Enable custom emojis in profiles (notes, field values, display names) (#7374)

Follow-up to #6124
This commit is contained in:
Eugen Rochko
2018-05-06 11:48:51 +02:00
committed by GitHub
parent bd10a7e480
commit 61a9018607
17 changed files with 43 additions and 27 deletions

View File

@ -5,7 +5,7 @@
.avatar= image_tag account.avatar.url(:original)
.name
= link_to TagManager.instance.url_for(account) do
%span.display_name.emojify= display_name(account)
%span.display_name.emojify= display_name(account, custom_emojify: true)
%span.username
@#{account.local? ? account.local_username_and_domain : account.acct}
= fa_icon('lock') if account.locked?

View File

@ -5,7 +5,7 @@
.card__bio
%h1.name
%span.p-name.emojify= display_name(account)
%span.p-name.emojify= display_name(account, custom_emojify: true)
%small<
%span>< @#{account.local_username_and_domain}
= fa_icon('lock') if account.locked?
@ -28,7 +28,7 @@
- account.fields.each do |field|
%dl
%dt.emojify{ title: field.name }= field.name
%dd.emojify{ title: field.value }= Formatter.instance.format_field(account, field.value)
%dd.emojify{ title: field.value }= Formatter.instance.format_field(account, field.value, custom_emojify: true)
.details-counters
.counter{ class: active_nav_class(short_account_url(account)) }

View File

@ -3,7 +3,7 @@
.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'))
= t('accounts.moved_html', name: content_tag(:strong, display_name(account, custom_emojify: true), 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
@ -13,5 +13,5 @@
.account__avatar-overlay-overlay{ style: "background-image: url('#{account.avatar.url(:original)}')" }
%span.display-name
%strong.emojify= display_name(moved_to_account)
%strong.emojify= display_name(moved_to_account, custom_emojify: true)
%span @#{moved_to_account.acct}