This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix remote reports with comments revealing remote reporter (mastodon#…
…17652) * Display username rather than display name in report comment For consistency with report notes and appeals * Fix remote reports with comments revealing remote reporter * Display instance name in placeholder * Make instance name in report comment a link to the federation admin page * Normalize i18n file
- Loading branch information
1 parent
0dc57ab
commit 57814a9
Showing
3 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,15 +122,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? && [email protected]_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)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters