Remove unused button argument to account_link_to helper

This commit is contained in:
Matt Jankowski 2025-09-03 09:48:15 -04:00
parent bc952ebde9
commit c04af95cf5
2 changed files with 25 additions and 27 deletions

View File

@ -7,34 +7,32 @@ module HomeHelper
} }
end end
def account_link_to(account, button = '', path: nil) def account_link_to(account, path: nil)
content_tag(:div, class: 'account account--minimal') do content_tag(:div, class: 'account account--minimal') do
content_tag(:div, class: 'account__wrapper') do content_tag(:div, class: 'account__wrapper') do
section = if account.nil? if account.nil?
content_tag(:div, class: 'account__display-name') do content_tag(:div, class: 'account__display-name') do
content_tag(:div, class: 'account__avatar-wrapper') do content_tag(:div, class: 'account__avatar-wrapper') do
image_tag(full_asset_url('avatars/original/missing.png', skip_pipeline: true), class: 'account__avatar') image_tag(full_asset_url('avatars/original/missing.png', skip_pipeline: true), class: 'account__avatar')
end + end +
content_tag(:span, class: 'display-name') do content_tag(:span, class: 'display-name') do
content_tag(:strong, t('about.contact_missing')) + content_tag(:strong, t('about.contact_missing')) +
content_tag(:span, t('about.contact_unavailable'), class: 'display-name__account') content_tag(:span, t('about.contact_unavailable'), class: 'display-name__account')
end end
end end
else else
link_to(path || ActivityPub::TagManager.instance.url_for(account), class: 'account__display-name') do link_to(path || ActivityPub::TagManager.instance.url_for(account), class: 'account__display-name') do
content_tag(:div, class: 'account__avatar-wrapper') do content_tag(:div, class: 'account__avatar-wrapper') do
image_tag(full_asset_url(current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url), class: 'account__avatar', width: 46, height: 46) image_tag(full_asset_url(current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url), class: 'account__avatar', width: 46, height: 46)
end + end +
content_tag(:span, class: 'display-name') do content_tag(:span, class: 'display-name') do
content_tag(:bdi) do content_tag(:bdi) do
content_tag(:strong, display_name(account, custom_emojify: true), class: 'display-name__html emojify') content_tag(:strong, display_name(account, custom_emojify: true), class: 'display-name__html emojify')
end + end +
content_tag(:span, "@#{account.acct}", class: 'display-name__account') content_tag(:span, "@#{account.acct}", class: 'display-name__account')
end end
end end
end end
section + button
end end
end end
end end

View File

@ -33,7 +33,7 @@
- @reports.group_by(&:target_account).each do |target_account, reports| - @reports.group_by(&:target_account).each do |target_account, reports|
.report-card .report-card
.report-card__profile .report-card__profile
= account_link_to target_account, '', path: admin_account_path(target_account.id) = account_link_to target_account, path: admin_account_path(target_account.id)
.report-card__profile__stats .report-card__profile__stats
= link_to t('admin.reports.account.notes', count: target_account.targeted_moderation_notes.count), admin_account_path(target_account.id) = link_to t('admin.reports.account.notes', count: target_account.targeted_moderation_notes.count), admin_account_path(target_account.id)
%br/ %br/