]> git.openstreetmap.org Git - rails.git/commitdiff
Move auth provider icons to auth_providers subdirectory
authorAnton Khorev <tony29@yandex.ru>
Fri, 19 Jul 2024 15:34:04 +0000 (18:34 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 19 Jul 2024 17:24:46 +0000 (20:24 +0300)
app/assets/images/auth_providers/facebook.svg [moved from app/assets/images/facebook.svg with 100% similarity]
app/assets/images/auth_providers/github.svg [moved from app/assets/images/github.svg with 100% similarity]
app/assets/images/auth_providers/google.svg [moved from app/assets/images/google.svg with 100% similarity]
app/assets/images/auth_providers/microsoft.svg [moved from app/assets/images/microsoft.svg with 100% similarity]
app/assets/images/auth_providers/openid.svg [moved from app/assets/images/openid.svg with 100% similarity]
app/assets/images/auth_providers/wikipedia.svg [moved from app/assets/images/wikipedia.svg with 100% similarity]
app/helpers/user_helper.rb
app/views/application/_auth_providers.html.erb
test/helpers/user_helper_test.rb

index 5863a9403820b7e6bfa622d5c07aa21d587f0418..0831cde6e21e316759c9a0a8546979b053f38445 100644 (file)
@@ -54,7 +54,7 @@ module UserHelper
 
   def auth_button(provider, options = {})
     link_to(
-      image_tag("#{provider}.svg",
+      image_tag("auth_providers/#{provider}.svg",
                 :alt => t("application.auth_providers.#{provider}.alt"),
                 :class => "rounded-1",
                 :size => "36"),
@@ -67,7 +67,7 @@ module UserHelper
 
   def auth_button_preferred(provider, options = {})
     link_to(
-      image_tag("#{provider}.svg",
+      image_tag("auth_providers/#{provider}.svg",
                 :alt => t("application.auth_providers.#{provider}.alt"),
                 :class => "rounded-1 me-3",
                 :size => "36") + t("application.auth_providers.#{provider}.title"),
index 895a42eb0bdf49fea6a7ff4b2a4bc5a6151bcd34..487256cb0724feebc02f57b7a06c9419cf7bc961 100644 (file)
@@ -13,7 +13,7 @@
     <div class="col justify-content-center d-flex align-items-center flex-wrap gap-2">
       <% Auth.providers.each_value do |provider| %>
         <% if provider == "openid" %>
-          <%= button_tag image_tag("openid.svg",
+          <%= button_tag image_tag("auth_providers/openid.svg",
                                    :alt => t(".openid.alt"),
                                    :size => "36"),
                          :type => "button",
@@ -31,7 +31,7 @@
   <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
     <div class="mb-3">
       <label for="openid_url" class="form-label">
-        <%= image_tag "openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
+        <%= image_tag "auth_providers/openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
         <%= t ".openid_url" %>
       </label>
       <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
index c4020dd7f489dae05d157646e25e735110402627..56f5776ad575268fbfeba36f0052373d982342df 100644 (file)
@@ -111,7 +111,7 @@ class UserHelperTest < ActionView::TestCase
 
   def test_auth_button
     button = auth_button("google")
-    img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
+    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)
   end