]> git.openstreetmap.org Git - rails.git/commitdiff
Style small auth buttons similarly to preferred auth buttons
authorAnton Khorev <tony29@yandex.ru>
Fri, 15 Nov 2024 16:09:57 +0000 (19:09 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 15 Nov 2024 16:09:57 +0000 (19:09 +0300)
app/helpers/user_helper.rb
app/views/application/_auth_providers.html.erb
test/helpers/user_helper_test.rb

index 0831cde6e21e316759c9a0a8546979b053f38445..e00a2253f7ded7898bf68fda69437d10c4d8470e 100644 (file)
@@ -60,7 +60,7 @@ module UserHelper
                 :size => "36"),
       auth_path(options.merge(:provider => provider)),
       :method => :post,
-      :class => "auth_button btn btn-light p-2",
+      :class => "auth_button btn btn-outline-secondary border p-2",
       :title => t("application.auth_providers.#{provider}.title")
     )
   end
index f6665cefecae153f74a1e9192ad17031dc21b704..3feda6139a4473b637ae4d678fd90da8f6879be6 100644 (file)
@@ -20,7 +20,7 @@
                          :data => { "bs-toggle" => "collapse",
                                     "bs-target" => "#login_auth_buttons, #openid_login_form" },
                          :title => t(".openid.title"),
-                         :class => "btn btn-light p-2" %>
+                         :class => "btn btn-outline-secondary border p-2" %>
         <% elsif provider != @preferred_auth_provider %>
           <%= auth_button provider %>
         <% end -%>
index 56f5776ad575268fbfeba36f0052373d982342df..16c854a519983a7f30f959c337ad4434f3004e4b 100644 (file)
@@ -112,7 +112,7 @@ class UserHelperTest < ActionView::TestCase
   def test_auth_button
     button = auth_button("google")
     img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/auth_providers/google.svg\" width=\"36\" height=\"36\" />"
-    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)
+    assert_equal("<a class=\"auth_button btn btn-outline-secondary border p-2\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
   end
 
   private