Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f1fc094d
Commit
f1fc094d
authored
Jan 25, 2021
by
Yogi
Committed by
David O'Regan
Jan 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Social connect button to new GitLab UI
parent
35a3072f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
10 deletions
+26
-10
app/assets/stylesheets/pages/profile.scss
app/assets/stylesheets/pages/profile.scss
+7
-0
app/views/profiles/accounts/_providers.html.haml
app/views/profiles/accounts/_providers.html.haml
+14
-10
changelogs/unreleased/yo-fix-social-buttons.yml
changelogs/unreleased/yo-fix-social-buttons.yml
+5
-0
No files found.
app/assets/stylesheets/pages/profile.scss
View file @
f1fc094d
...
@@ -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
;
...
...
app/views/profiles/accounts/_providers.html.haml
View file @
f1fc094d
-
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
changelogs/unreleased/yo-fix-social-buttons.yml
0 → 100644
View file @
f1fc094d
---
title
:
Move Social connect button to new GitLab UI
merge_request
:
51835
author
:
Yogi (@yo)
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment