Commit f1fc094d authored by Yogi's avatar Yogi Committed by David O'Regan

Move Social connect button to new GitLab UI

parent 35a3072f
...@@ -138,6 +138,13 @@ ...@@ -138,6 +138,13 @@
} }
} }
.social-provider-btn-image {
> img {
width: 16px;
vertical-align: inherit;
}
}
.provider-btn-image { .provider-btn-image {
display: inline-block; display: inline-block;
padding: 5px 10px; padding: 5px 10px;
......
- button_class = 'btn btn-default gl-button'
%label.label-bold %label.label-bold
= s_('Profiles|Connected Accounts') = s_('Profiles|Connected Accounts')
%p= s_('Profiles|Click on icon to activate signin with one of the following services') %p= s_('Profiles|Click on icon to activate signin with one of the following services')
...@@ -5,17 +7,19 @@ ...@@ -5,17 +7,19 @@
- unlink_allowed = unlink_provider_allowed?(provider) - unlink_allowed = unlink_provider_allowed?(provider)
- link_allowed = link_provider_allowed?(provider) - link_allowed = link_provider_allowed?(provider)
- if unlink_allowed || link_allowed - if unlink_allowed || link_allowed
.provider-btn-group - if auth_active?(provider)
.provider-btn-image - if unlink_allowed
= provider_image_tag(provider) = link_to unlink_profile_account_path(provider: provider), method: :delete, class: button_class do
- if auth_active?(provider) .social-provider-btn-image.gl-button-icon= provider_image_tag(provider)
- if unlink_allowed .gl-button-text
= link_to unlink_profile_account_path(provider: provider), method: :delete, class: 'provider-btn' do
= s_('Profiles|Disconnect %{provider}') % { provider: label_for_provider(provider) } = s_('Profiles|Disconnect %{provider}') % { provider: label_for_provider(provider) }
- else - else
%a.provider-btn %a{ class: button_class }
.gl-button-text
= s_('Profiles|%{provider} Active') % { provider: label_for_provider(provider) } = s_('Profiles|%{provider} Active') % { provider: label_for_provider(provider) }
- elsif link_allowed - elsif link_allowed
= link_to omniauth_authorize_path(:user, provider), method: :post, class: 'provider-btn gl-text-blue-500' do = link_to omniauth_authorize_path(:user, provider), method: :post, class: button_class do
.social-provider-btn-image.gl-button-icon= provider_image_tag(provider)
.gl-button-text
= s_('Profiles|Connect %{provider}') % { provider: label_for_provider(provider) } = s_('Profiles|Connect %{provider}') % { provider: label_for_provider(provider) }
= render_if_exists 'profiles/accounts/group_saml_unlink_buttons', group_saml_identities: group_saml_identities = render_if_exists 'profiles/accounts/group_saml_unlink_buttons', group_saml_identities: group_saml_identities
---
title: Move Social connect button to new GitLab UI
merge_request: 51835
author: Yogi (@yo)
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment