diff options
Diffstat (limited to 'app/views/profiles/accounts')
-rw-r--r-- | app/views/profiles/accounts/_providers.html.haml | 24 | ||||
-rw-r--r-- | app/views/profiles/accounts/show.html.haml | 21 |
2 files changed, 26 insertions, 19 deletions
diff --git a/app/views/profiles/accounts/_providers.html.haml b/app/views/profiles/accounts/_providers.html.haml index f7368c5e921..5c0044ed825 100644 --- a/app/views/profiles/accounts/_providers.html.haml +++ b/app/views/profiles/accounts/_providers.html.haml @@ -1,3 +1,5 @@ +- button_class = 'btn btn-default gl-button gl-mb-3 gl-mr-3' + %label.label-bold = s_('Profiles|Connected Accounts') %p= s_('Profiles|Click on icon to activate signin with one of the following services') @@ -5,17 +7,19 @@ - unlink_allowed = unlink_provider_allowed?(provider) - link_allowed = link_provider_allowed?(provider) - if unlink_allowed || link_allowed - .provider-btn-group - .provider-btn-image - = provider_image_tag(provider) - - if auth_active?(provider) - - if unlink_allowed - = link_to unlink_profile_account_path(provider: provider), method: :delete, class: 'provider-btn' do + - if auth_active?(provider) + - if unlink_allowed + = link_to unlink_profile_account_path(provider: provider), method: :delete, class: button_class do + .social-provider-btn-image.gl-button-icon= provider_image_tag(provider) + .gl-button-text = s_('Profiles|Disconnect %{provider}') % { provider: label_for_provider(provider) } - - else - %a.provider-btn + - else + %a{ class: button_class } + .gl-button-text = s_('Profiles|%{provider} Active') % { provider: label_for_provider(provider) } - - elsif link_allowed - = link_to omniauth_authorize_path(:user, provider), method: :post, class: 'provider-btn gl-text-blue-500' do + - elsif link_allowed + = 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) } = render_if_exists 'profiles/accounts/group_saml_unlink_buttons', group_saml_identities: group_saml_identities diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index ca64c5f57b3..e8b2c5db4e6 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -15,7 +15,7 @@ .gl-alert-body = _('Congratulations! You have enabled Two-factor Authentication!') -.row.gl-mt-3 +.row.gl-mt-3.js-search-settings-section .col-lg-4.profile-settings-sidebar %h4.gl-mt-0 = s_('Profiles|Two-Factor Authentication') @@ -29,10 +29,11 @@ - else .gl-mb-3 = link_to _('Enable two-factor authentication'), profile_two_factor_auth_path, class: 'gl-button btn btn-success', data: { qa_selector: 'enable_2fa_button' } + .col-lg-12 + %hr -%hr - if display_providers_on_profile? - .row.gl-mt-3 + .row.gl-mt-3.js-search-settings-section .col-lg-4.profile-settings-sidebar %h4.gl-mt-0 = s_('Profiles|Social sign-in') @@ -40,9 +41,10 @@ = s_('Profiles|Activate signin with one of the following services') .col-lg-8 = render 'providers', providers: button_based_providers, group_saml_identities: local_assigns[:group_saml_identities] - %hr + .col-lg-12 + %hr - if current_user.can_change_username? - .row.gl-mt-3 + .row.gl-mt-3.js-search-settings-section .col-lg-4.profile-settings-sidebar %h4.gl-mt-0.warning-title = s_('Profiles|Change username') @@ -53,9 +55,10 @@ .col-lg-8 - data = { initial_username: current_user.username, root_url: root_url, action_url: update_username_profile_path(format: :json) } #update-username{ data: data } - %hr + .col-lg-12 + %hr -.row.gl-mt-3 +.row.gl-mt-3.js-search-settings-section .col-lg-4.profile-settings-sidebar %h4.gl-mt-0.danger-title = s_('Profiles|Delete account') @@ -81,9 +84,9 @@ = s_('Profiles|You must transfer ownership or delete these groups before you can delete your account.') - elsif !current_user.can_remove_self? %p - = s_('Profiles|GitLab is unable to verify your identity automatically.') + = s_('Profiles|GitLab is unable to verify your identity automatically. For security purposes, you must set a password by %{openingTag}resetting your password%{closingTag} to delete your account.').html_safe % { openingTag: "<a href='#{reset_profile_password_path}' rel=\"nofollow\" data-method=\"put\">".html_safe, closingTag: '</a>'.html_safe} %p - = s_('Profiles|Please email %{data_request} to begin the account deletion process.').html_safe % { data_request: mail_to('personal-data-request@gitlab.com') } + = s_('Profiles|If after setting a password, the option to delete your account is still not available, please email %{data_request} to begin the account deletion process.').html_safe % { data_request: mail_to('personal-data-request@gitlab.com') } - else %p = s_("Profiles|You don't have access to delete this user.") |