diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-26 21:15:37 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-02-26 21:15:37 +0100 |
commit | 8158b04d184e617cbd49c83fd0734a445742146a (patch) | |
tree | f8038129661cd4cbadde19b4c1244a50b0709324 /app/views/admin/reports/show.html.haml | |
parent | 551820cbd9e5beebd16f16205143e2263d4f2d51 (diff) | |
parent | 57814a98a9c8e4b106d44a31e36561f585f73bac (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/views/admin/reports/show.html.haml')
-rw-r--r-- | app/views/admin/reports/show.html.haml | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index abcbec949..209fbb698 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -118,15 +118,28 @@ = react_admin_component :report_reason_selector, id: @report.id, category: @report.category, rule_ids: @report.rule_ids&.map(&:to_s), disabled: @report.action_taken? - if @report.comment.present? - %p= t('admin.reports.comment_description_html', name: content_tag(:strong, @report.account.username, class: 'username')) + - if @report.account.instance_actor? + %p= t('admin.reports.comment_description_html', name: content_tag(:strong, site_hostname, class: 'username')) + - elsif @report.account.local? + %p= t('admin.reports.comment_description_html', name: content_tag(:strong, @report.account.username, class: 'username')) + - else + %p= t('admin.reports.comment_description_html', name: t('admin.reports.remote_user_placeholder', instance: @report.account.domain)) .report-notes .report-notes__item - = image_tag @report.account.avatar.url, class: 'report-notes__item__avatar' + - if @report.account.local? && !@report.account.instance_actor? + = image_tag @report.account.avatar.url, class: 'report-notes__item__avatar' + - else + = image_tag(full_asset_url('avatars/original/missing.png', skip_pipeline: true), class: 'report-notes__item__avatar') .report-notes__item__header %span.username - = link_to display_name(@report.account), admin_account_path(@report.account_id) + - if @report.account.instance_actor? + = site_hostname + - elsif @report.account.local? + = link_to @report.account.username, admin_account_path(@report.account_id) + - else + = link_to @report.account.domain, admin_instance_path(@report.account.domain) %time{ datetime: @report.created_at.iso8601, title: l(@report.created_at) } - if @report.created_at.today? = t('admin.report_notes.today_at', time: l(@report.created_at, format: :time)) |