docbrown/app/views/users/_additional_authentication.html.erb
yheuhtozr a1e8f29fe6
user settings i18n (#15098)
Co-authored-by: Nick Taylor <nick@dev.to>
2021-12-02 11:35:08 -05:00

20 lines
1.1 KiB
Text

<% unless @user.authenticated_with_all_providers? %>
<div class="crayons-card crayons-card--content-rows block">
<% authentication_enabled_providers.each do |provider| %>
<!--
INFO: [@forem/oss] We only support creating new accounts and then
signing in with them) using Apple Auth. Connecting Forem existing
accounts to Apple Auth isn't supported and is why we skip it here.
-->
<% next if provider.provider_name == :apple %>
<% unless @user.authenticated_through?(provider.provider_name) %>
<%= form_with url: provider.sign_in_path(state: "profile"), class: "flex w-100", local: true do |f| %>
<%= f.button type: :submit, class: "crayons-btn crayons-btn--icon-left crayons-btn--brand-#{provider.provider_name} m-1" do %>
<%= inline_svg_tag("#{provider.provider_name}.svg", aria: true, class: "crayons-icon", title: provider.provider_name) %>
<%= t("views.settings.account.connect", provider: provider.official_name) %>
<% end %>
<% end %>
<% end %>
<% end %>
</div>
<% end %>