Move auth provider icons to auth_providers subdirectory
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 451 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
@ -54,7 +54,7 @@ module UserHelper
|
||||||
|
|
||||||
def auth_button(provider, options = {})
|
def auth_button(provider, options = {})
|
||||||
link_to(
|
link_to(
|
||||||
image_tag("#{provider}.svg",
|
image_tag("auth_providers/#{provider}.svg",
|
||||||
:alt => t("application.auth_providers.#{provider}.alt"),
|
:alt => t("application.auth_providers.#{provider}.alt"),
|
||||||
:class => "rounded-1",
|
:class => "rounded-1",
|
||||||
:size => "36"),
|
:size => "36"),
|
||||||
|
@ -67,7 +67,7 @@ module UserHelper
|
||||||
|
|
||||||
def auth_button_preferred(provider, options = {})
|
def auth_button_preferred(provider, options = {})
|
||||||
link_to(
|
link_to(
|
||||||
image_tag("#{provider}.svg",
|
image_tag("auth_providers/#{provider}.svg",
|
||||||
:alt => t("application.auth_providers.#{provider}.alt"),
|
:alt => t("application.auth_providers.#{provider}.alt"),
|
||||||
:class => "rounded-1 me-3",
|
:class => "rounded-1 me-3",
|
||||||
:size => "36") + t("application.auth_providers.#{provider}.title"),
|
:size => "36") + t("application.auth_providers.#{provider}.title"),
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="col justify-content-center d-flex align-items-center flex-wrap gap-2">
|
<div class="col justify-content-center d-flex align-items-center flex-wrap gap-2">
|
||||||
<% Auth.providers.each_value do |provider| %>
|
<% Auth.providers.each_value do |provider| %>
|
||||||
<% if provider == "openid" %>
|
<% if provider == "openid" %>
|
||||||
<%= button_tag image_tag("openid.svg",
|
<%= button_tag image_tag("auth_providers/openid.svg",
|
||||||
:alt => t(".openid.alt"),
|
:alt => t(".openid.alt"),
|
||||||
:size => "36"),
|
:size => "36"),
|
||||||
:type => "button",
|
:type => "button",
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
|
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="openid_url" class="form-label">
|
<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" %>
|
<%= t ".openid_url" %>
|
||||||
</label>
|
</label>
|
||||||
<%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
|
<%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
|
||||||
|
|
|
@ -111,7 +111,7 @@ class UserHelperTest < ActionView::TestCase
|
||||||
|
|
||||||
def test_auth_button
|
def test_auth_button
|
||||||
button = auth_button("google")
|
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)
|
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
|
end
|
||||||
|
|
||||||
|
|