From 1da67ccf8dfe3a6ef8f5660e1e2ea13d40e0effe Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 10 Nov 2023 08:42:50 +0100 Subject: [PATCH] Use Remix icons if Solidus' admin_updated_navbar is enabled Solidus 2.4 introduced a new admin navbar with new icons that can be enabled in the settings. Adopt to that. --- .../install/templates/initializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/solidus_friendly_promotions/install/templates/initializer.rb b/lib/generators/solidus_friendly_promotions/install/templates/initializer.rb index d8424b3c..651d8333 100644 --- a/lib/generators/solidus_friendly_promotions/install/templates/initializer.rb +++ b/lib/generators/solidus_friendly_promotions/install/templates/initializer.rb @@ -17,7 +17,7 @@ if item.respond_to?(:children) Spree::BackendConfiguration::MenuItem.new( label: :promotions, - icon: "bullhorn", + icon: config.admin_updated_navbar ? "ri-megaphone-line" : "bullhorn", condition: -> { can?(:admin, SolidusFriendlyPromotions::Promotion) }, url: -> { SolidusFriendlyPromotions::Engine.routes.url_helpers.admin_promotions_path }, data_hook: :admin_promotion_sub_tabs,