Only render div if the user is able to connect another auth (#8730)

* Only render div if the user is able to connect another auth

* Use generalized auth provider size instead

* Hide blank div in account page too
This commit is contained in:
Andy Zhao 2020-06-17 14:57:20 -04:00 committed by GitHub
parent 5320f533ad
commit 0a41ff658b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,8 @@
<div class="crayons-card mb-6 p-5">
<%= render "users/additional_authentication" %>
</div>
<% if @user.identities.size < Authentication::Providers.enabled.size %>
<div class="crayons-card mb-6 p-5">
<%= render "users/additional_authentication" %>
</div>
<% end %>
<div class="crayons-card mb-6 p-6 grid gap-6">
<header>

View file

@ -1,8 +1,10 @@
<%= javascript_packs_with_chunks_tag "colorPreview", "validateFileInputs", defer: true %>
<div class="crayons-card mb-6 p-5">
<%= render "users/additional_authentication" %>
</div>
<% if @user.identities.size < Authentication::Providers.enabled.size %>
<div class="crayons-card mb-6 p-5">
<%= render "users/additional_authentication" %>
</div>
<% end %>
<div class="crayons-card mb-6 p-6 grid gap-6">
<div class="flex items-center">