From 3498bd9072c27cb444d395c74cdfae8c7bc76117 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 20 Oct 2022 21:13:18 +0200 Subject: [PATCH] Use data-turbo-method for mod (un)masking link --- app/views/navigation/dropdown/_profile.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/navigation/dropdown/_profile.haml b/app/views/navigation/dropdown/_profile.haml index e9ad76ff..0bccecfd 100644 --- a/app/views/navigation/dropdown/_profile.haml +++ b/app/views/navigation/dropdown/_profile.haml @@ -23,11 +23,11 @@ .dropdown-divider - if current_user.mod? - if moderation_view? - = link_to moderation_toggle_unmask_path, method: :post, class: "dropdown-item" do + = link_to moderation_toggle_unmask_path, class: "dropdown-item", data: { turbo_method: :post } do %i.fa.fa-toggle-on = t(".unmask.disable") - else - = link_to moderation_toggle_unmask_path, method: :post, class: "dropdown-item" do + = link_to moderation_toggle_unmask_path, class: "dropdown-item", data: { turbo_method: :post } do %i.fa.fa-toggle-off = t(".unmask.enable") %a.dropdown-item{ href: mod_anon_block_index_path }