]> git.openstreetmap.org Git - rails.git/commitdiff
Remove .d-block classes from auth buttons
authorAnton Khorev <tony29@yandex.ru>
Tue, 9 Jul 2024 14:21:34 +0000 (17:21 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 9 Jul 2024 14:51:50 +0000 (17:51 +0300)
Unnecessary on flex items.

app/helpers/user_helper.rb
app/views/application/_auth_providers.html.erb
test/helpers/user_helper_test.rb

index 3e779a00c9ea8cdc4b36f3a3c96fbeb31d7af2f6..26ba2c528bb99f229b8f654de9463f6dfefbae61 100644 (file)
@@ -64,7 +64,7 @@ module UserHelper
                 :size => "36"),
       auth_path(options.merge(:provider => provider)),
       :method => :post,
                 :size => "36"),
       auth_path(options.merge(:provider => provider)),
       :method => :post,
-      :class => "auth_button btn btn-light p-2 d-block",
+      :class => "auth_button btn btn-light p-2",
       :title => t("application.auth_providers.#{name}.title")
     )
   end
       :title => t("application.auth_providers.#{name}.title")
     )
   end
index 564732d36a720a2cd6a9876096576e3dbd8ff96e..d2ff6865fcbfb4c1ec07f04e9161f071029b305a 100644 (file)
@@ -31,7 +31,7 @@
                   "#",
                   :id => "openid_open_url",
                   :title => t("application.auth_providers.openid.title"),
                   "#",
                   :id => "openid_open_url",
                   :title => t("application.auth_providers.openid.title"),
-                  :class => "btn btn-light p-2 d-block" %>
+                  :class => "btn btn-light p-2" %>
 
       <% %w[google facebook microsoft github wikipedia].each do |provider| %>
         <% unless @preferred_auth_provider == provider %>
 
       <% %w[google facebook microsoft github wikipedia].each do |provider| %>
         <% unless @preferred_auth_provider == provider %>
index a415bd029ef79a4862292c7eea9d0aa45c4fb68a..eaf406a067b6941d93da7b380472d4c3ae9eb1a9 100644 (file)
@@ -117,7 +117,7 @@ class UserHelperTest < ActionView::TestCase
   def test_auth_button
     button = auth_button("google", "google")
     img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
   def test_auth_button
     button = auth_button("google", "google")
     img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
-    assert_equal("<a class=\"auth_button btn btn-light p-2 d-block\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
+    assert_equal("<a class=\"auth_button btn btn-light p-2\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
   end
 
   private
   end
 
   private