From 2459190a5ea42abfe3d965bd7e34ce9bc6da94cb Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Sat, 17 Aug 2024 21:09:43 +0200 Subject: [PATCH 1/2] Add warning in reports if the local reporting user has disabled hiding of sensitive media Fixes #29291 --- app/views/admin/reports/show.html.haml | 3 +++ config/locales/en.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index 69e9c02921..9c7d13b58a 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -29,6 +29,9 @@ - if @report.comment.present? = render 'admin/reports/comment', report: @report +- if @report.account.local? && (@report.account.user.settings['web.expand_content_warnings'] || @report.account.user.settings['web.display_media'] == 'show_all') + .flash-message.warning= t('admin.reports.sensitive_media_explanation') + %hr.spacer/ %h3 diff --git a/config/locales/en.yml b/config/locales/en.yml index 1df9af88d9..c8234ebd15 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -645,6 +645,7 @@ en: reported_with_application: Reported with application resolved: Resolved resolved_msg: Report successfully resolved! + sensitive_media_explanation: The reporting user has content warnings disabled or has chosen to always shows media, even if it contains sensitive content. skip_to_actions: Skip to actions status: Status statuses: Reported content From ec2ce1a82251fc92915f8a3149856f854e0d4d99 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Sat, 17 Aug 2024 21:11:26 +0200 Subject: [PATCH 2/2] Only show sensitive media disabled warning if there are statuses associated with the report --- app/views/admin/reports/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index 9c7d13b58a..5d569b365c 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -29,7 +29,7 @@ - if @report.comment.present? = render 'admin/reports/comment', report: @report -- if @report.account.local? && (@report.account.user.settings['web.expand_content_warnings'] || @report.account.user.settings['web.display_media'] == 'show_all') +- if @report.account.local? && !@statuses.empty? && (@report.account.user.settings['web.expand_content_warnings'] || @report.account.user.settings['web.display_media'] == 'show_all') .flash-message.warning= t('admin.reports.sensitive_media_explanation') %hr.spacer/