Add highlight to moderation panel link if there are new reports

This commit is contained in:
Andreas Nedbal 2024-03-01 22:12:17 +01:00 committed by Andreas Nedbal
parent 34421b34f3
commit 3a801baf1a
1 changed files with 2 additions and 2 deletions

View File

@ -16,8 +16,8 @@
= link_to moderation_toggle_unmask_path, class: "dropdown-item", data: { turbo_method: :post } do = link_to moderation_toggle_unmask_path, class: "dropdown-item", data: { turbo_method: :post } do
%i.fa.fa-toggle-off %i.fa.fa-toggle-off
= t(".unmask.enable") = t(".unmask.enable")
%a.dropdown-item{ href: moderation_reports_path } %a.dropdown-item{ class: @has_new_reports ? "text-primary" : nil, href: moderation_reports_path }
%i.fa.fa-fw.fa-gavel %i.fa.fa-fw.fa-gavel{ class: @has_new_reports ? "fa-fade" : nil }
= t(".moderation") = t(".moderation")
- if current_user.has_cached_role?(:administrator) - if current_user.has_cached_role?(:administrator)
%a.dropdown-item{ href: admin_dashboard_path } %a.dropdown-item{ href: admin_dashboard_path }