]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4772'
authorTom Hughes <tom@compton.nu>
Wed, 8 May 2024 17:29:53 +0000 (18:29 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 8 May 2024 17:29:53 +0000 (18:29 +0100)
Gemfile
Gemfile.lock
app/helpers/user_roles_helper.rb

diff --git a/Gemfile b/Gemfile
index 0181c5c6866424d9ec5fde7b774364bfe2d912c4..5385e1217978d7a7c4cfcf41fd459923e2f7b551 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -131,7 +131,7 @@ gem "gd2-ffij", ">= 0.4.0"
 gem "marcel"
 
 # Used for browser detection
-gem "browser"
+gem "browser", "< 6" # for ruby 3.0 support
 
 # Used for S3 object storage
 gem "aws-sdk-s3"
index 0b2ecf330d4832005ae763681ef8139f97fe0be9..62a312dca9addedf8700e42c8e818d72528f4723 100644 (file)
@@ -136,7 +136,7 @@ GEM
     brakeman (6.1.2)
       racc
     brotli (0.5.0)
-    browser (6.0.0)
+    browser (5.3.1)
     builder (3.2.4)
     bzip2-ffi (1.1.1)
       ffi (~> 1.0)
@@ -336,8 +336,7 @@ GEM
       minitest (>= 4, < 6)
     msgpack (1.7.2)
     multi_json (1.15.0)
-    multi_xml (0.7.1)
-      bigdecimal (~> 3.1)
+    multi_xml (0.6.0)
     mutex_m (0.2.0)
     net-http (0.4.1)
       uri
@@ -613,7 +612,7 @@ DEPENDENCIES
   bootstrap (~> 5.3.2)
   bootstrap_form (~> 5.0)
   brakeman
-  browser
+  browser (< 6)
   bzip2-ffi
   cancancan
   canonical-rails
index 4634cb015507c197581846f4dc86d3573897580f..e839c0ae65f27f5af07df0d03b43f046914800a5 100644 (file)
@@ -24,7 +24,7 @@ module UserRolesHelper
   def role_icon_svg_tag(role, blank, title, **options)
     role_colors = {
       "administrator" => "#f69e42",
-      "moderator" => "#0606ff",
+      "moderator" => "#447eff",
       "importer" => "#38e13a"
     }
     color = role_colors[role] || "currentColor"
@@ -32,8 +32,11 @@ module UserRolesHelper
     path_data = "M 10,2 8.125,8 2,8 6.96875,11.71875 5,18 10,14 15,18 13.03125,11.71875 18,8 11.875,8 10,2 z"
     tag.svg(:width => 20, :height => 20, **options) do
       concat tag.title(title)
-      concat tag.path(:d => path_data, :fill => color, :stroke => color, "stroke-width" => 2, "stroke-linejoin" => "round")
-      concat tag.path(:d => path_data, :fill => "#fff") if blank
+      concat tag.path(:d => path_data,
+                      :fill => blank ? "none" : color,
+                      :stroke => color,
+                      "stroke-width" => blank ? 1.5 : 2,
+                      "stroke-linejoin" => "round")
     end
   end
 end