diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/admin/account_moderation_notes_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/home_helper.rb | 16 | ||||
-rw-r--r-- | app/helpers/settings_helper.rb | 1 |
3 files changed, 15 insertions, 6 deletions
diff --git a/app/helpers/admin/account_moderation_notes_helper.rb b/app/helpers/admin/account_moderation_notes_helper.rb index 25586fbba..4d8f0352e 100644 --- a/app/helpers/admin/account_moderation_notes_helper.rb +++ b/app/helpers/admin/account_moderation_notes_helper.rb @@ -4,7 +4,7 @@ module Admin::AccountModerationNotesHelper def admin_account_link_to(account) return if account.nil? - link_to admin_account_path(account.id), class: name_tag_classes(account) do + link_to admin_account_path(account.id), class: name_tag_classes(account), title: account.acct do safe_join([ image_tag(account.avatar.url, width: 15, height: 15, alt: display_name(account), class: 'avatar'), content_tag(:span, account.acct, class: 'username'), @@ -15,7 +15,7 @@ module Admin::AccountModerationNotesHelper def admin_account_inline_link_to(account) return if account.nil? - link_to admin_account_path(account.id), class: name_tag_classes(account, true) do + link_to admin_account_path(account.id), class: name_tag_classes(account, true), title: account.acct do content_tag(:span, account.acct, class: 'username') end end diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index f5b501235..ba7c443c2 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -7,13 +7,13 @@ module HomeHelper } end - def account_link_to(account, button = '') + def account_link_to(account, button = '', size: 36, path: nil) content_tag(:div, class: 'account') do content_tag(:div, class: 'account__wrapper') do section = if account.nil? content_tag(:div, class: 'account__display-name') do content_tag(:div, class: 'account__avatar-wrapper') do - content_tag(:div, '', class: 'account__avatar', style: "background-image: url(#{full_asset_url('avatars/original/missing.png', skip_pipeline: true)})") + content_tag(:div, '', class: 'account__avatar', style: "width: #{size}px; height: #{size}px; background-size: #{size}px #{size}px; background-image: url(#{full_asset_url('avatars/original/missing.png', skip_pipeline: true)})") end + content_tag(:span, class: 'display-name') do content_tag(:strong, t('about.contact_missing')) + @@ -21,9 +21,9 @@ module HomeHelper end end else - link_to(TagManager.instance.url_for(account), class: 'account__display-name') do + link_to(path || TagManager.instance.url_for(account), class: 'account__display-name') do content_tag(:div, class: 'account__avatar-wrapper') do - content_tag(:div, '', class: 'account__avatar', style: "background-image: url(#{account.avatar.url})") + content_tag(:div, '', class: 'account__avatar', style: "width: #{size}px; height: #{size}px; background-size: #{size}px #{size}px; background-image: url(#{account.avatar.url})") end + content_tag(:span, class: 'display-name') do content_tag(:bdi) do @@ -48,4 +48,12 @@ module HomeHelper '1+' end end + + def custom_field_classes(field) + if field.verified? + 'verified' + else + 'emojify' + end + end end diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index fc03fcf82..ed873ceed 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -8,6 +8,7 @@ module SettingsHelper bg: 'Български', ca: 'Català', co: 'Corsu', + cs: 'Čeština', cy: 'Cymraeg', da: 'Dansk', de: 'Deutsch', |