]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4764'
authorTom Hughes <tom@compton.nu>
Wed, 8 May 2024 17:47:09 +0000 (18:47 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 8 May 2024 17:47:09 +0000 (18:47 +0100)
Gemfile
Gemfile.lock
app/assets/javascripts/application.js
app/assets/javascripts/bs-custom-file-input-init.js [deleted file]
app/helpers/user_roles_helper.rb
package.json
yarn.lock

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 c71c0652dad9b652dc34caa44e9392d8013a5f91..20976d15a56ff93264d1d81a511c564840517904 100644 (file)
@@ -16,8 +16,6 @@
 //= require matomo
 //= require richtext
 //= require qs/dist/qs
-//= require bs-custom-file-input
-//= require bs-custom-file-input-init
 
 /*
  * Called as the user scrolls/zooms around to manipulate hrefs of the
diff --git a/app/assets/javascripts/bs-custom-file-input-init.js b/app/assets/javascripts/bs-custom-file-input-init.js
deleted file mode 100644 (file)
index 3afdac2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/* global bsCustomFileInput */
-
-$(document).ready(function () {
-  bsCustomFileInput.init();
-});
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
index 0a9ebf0b66e4b06678d5ea2709b21ec59581f99a..7d19be0d28bcadc8fd31442278aeda81ee2ffcf2 100644 (file)
@@ -2,7 +2,6 @@
   "name": "openstreetmap",
   "private": true,
   "dependencies": {
-    "bs-custom-file-input": "^1.3.4",
     "jquery-simulate": "^1.0.2",
     "js-cookie": "^3.0.0",
     "leaflet": "^1.8.0",
index f40f5e46bd8e4a54f88fd3bc43593c8b9e8c3b36..0c3bd5c63097296c8e592e6c7262a55f3b98d8a6 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -134,11 +134,6 @@ brace-expansion@^1.1.7:
     balanced-match "^1.0.0"
     concat-map "0.0.1"
 
-bs-custom-file-input@^1.3.4:
-  version "1.3.4"
-  resolved "https://registry.yarnpkg.com/bs-custom-file-input/-/bs-custom-file-input-1.3.4.tgz#c275cb8d4f1c02ba026324292509fa9a747dbda8"
-  integrity sha512-NBsQzTnef3OW1MvdKBbMHAYHssCd613MSeJV7z2McXznWtVMnJCy7Ckyc+PwxV6Pk16cu6YBcYWh/ZE0XWNKCA==
-
 call-bind@^1.0.7:
   version "1.0.7"
   resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9"