]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4859'
authorTom Hughes <tom@compton.nu>
Wed, 29 May 2024 17:47:04 +0000 (18:47 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 29 May 2024 17:47:04 +0000 (18:47 +0100)
app/views/application/_auth_providers.html.erb
yarn.lock

index 554ec8ddaa30c235b02e7efb603506c96518b636..0cbb529a500c70a34be6dc605dcfc3d469328fdc 100644 (file)
@@ -1,29 +1,42 @@
 <div>
-  <div class="list-inline justify-content-center d-flex align-items-center flex-wrap mb-3 gap-3" id="login_auth_buttons">
+  <div class="list-inline justify-content-center d-flex align-items-center flex-wrap w-100 mb-3" id="login_auth_buttons">
 
+    <% prefered_auth_button_available = false %>
     <% %w[google facebook microsoft github wikipedia].each do |provider| %>
       <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
         <% if @preferred_auth_provider == provider %>
-          <div class="mx-2"><%= auth_button_preferred provider, provider %></div>
+          <% prefered_auth_button_available = true %>
         <% end %>
       <% end -%>
     <% end -%>
 
-    <div class="justify-content-center d-flex gap-1">
-      <div>
-        <%= link_to image_tag("openid.png",
-                              :alt => t("application.auth_providers.openid.title"),
-                              :size => "24"),
-                    "#",
-                    :id => "openid_open_url",
-                    :title => t("application.auth_providers.openid.title"),
-                    :class => "p-2 d-block" %>
+    <% if prefered_auth_button_available %>
+      <div class="list-inline justify-content-center d-flex align-items-center flex-wrap w-50">
+        <% %w[google facebook microsoft github wikipedia].each do |provider| %>
+          <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
+            <% if @preferred_auth_provider == provider %>
+              <%= auth_button_preferred provider, provider %>
+            <% end %>
+          <% end -%>
+        <% end -%>
       </div>
+      <div class="list-inline justify-content-center d-flex align-items-center flex-wrap w-50">
+    <% else %>
+      <div class="list-inline justify-content-center d-flex align-items-center flex-wrap w-100">
+    <% end %>
+
+      <%= link_to image_tag("openid.png",
+                            :alt => t("application.auth_providers.openid.title"),
+                            :size => "24"),
+                  "#",
+                  :id => "openid_open_url",
+                  :title => t("application.auth_providers.openid.title"),
+                  :class => "p-2 d-block" %>
 
       <% %w[google facebook microsoft github wikipedia].each do |provider| %>
         <% unless @preferred_auth_provider == provider %>
           <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
-            <div><%= auth_button provider, provider %></div>
+            <%= auth_button provider, provider %>
           <% end -%>
         <% end %>
       <% end -%>
index 230c1c716a0c97461471e69eeb10d1faca714896..dec04559d1beb6d10efceed8149bc69bceab5009 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -576,9 +576,9 @@ optionator@^0.9.3:
     type-check "^0.4.0"
 
 osm-community-index@^5.2.0:
-  version "5.7.0"
-  resolved "https://registry.yarnpkg.com/osm-community-index/-/osm-community-index-5.7.0.tgz#1c1a785fd13a2e00535da8db132c4e49780f0b28"
-  integrity sha512-r5h58L9mGh2Wu4XcJoGKLdw3oBY41jWAMUVBNE9tBS9sZINwSZccrImhxuOS5DmpslTjZ6w1cn7x9sE8tnFGpQ==
+  version "5.7.1"
+  resolved "https://registry.yarnpkg.com/osm-community-index/-/osm-community-index-5.7.1.tgz#2341666c83d14c00ef3d9a90298c96d5e791b56c"
+  integrity sha512-E+Xib5m//WliNq2iqeUXyKqZk7yhZu/vSJbwwyxDAPzcNWxgIMoO0B7cUMeFNckhMQsKM2UuC2BAjWuVfbYf1Q==
   dependencies:
     diacritics "^1.3.0"