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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
4c5d4a69
Commit
4c5d4a69
authored
Jul 10, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve spacing / alignments in gpg popup
parent
8ccce9d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
36 deletions
+27
-36
app/assets/stylesheets/pages/commits.scss
app/assets/stylesheets/pages/commits.scss
+8
-18
app/views/projects/commit/_invalid_signature_badge.html.haml
app/views/projects/commit/_invalid_signature_badge.html.haml
+2
-1
app/views/projects/commit/_signature_badge.html.haml
app/views/projects/commit/_signature_badge.html.haml
+4
-4
app/views/projects/commit/_valid_signature_badge.html.haml
app/views/projects/commit/_valid_signature_badge.html.haml
+6
-6
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+7
-7
No files found.
app/assets/stylesheets/pages/commits.scss
View file @
4c5d4a69
...
@@ -296,16 +296,16 @@
...
@@ -296,16 +296,16 @@
}
}
}
}
.gpg-popover-title
{
.gpg-popover-status
{
display
:
inline
;
display
:
flex
;
align-items
:
center
;
font-weight
:
normal
;
font-weight
:
normal
;
line-height
:
1
.5
;
}
}
.gpg-popover-icon
{
.gpg-popover-icon
{
float
:
left
;
font-size
:
35px
;
font-size
:
35px
;
line-height
:
35px
;
// same margin as .s32.avatar
width
:
32px
;
margin-right
:
$btn-side-margin
;
margin-right
:
$btn-side-margin
;
&
.valid
{
&
.valid
{
...
@@ -318,23 +318,13 @@
...
@@ -318,23 +318,13 @@
}
}
.gpg-popover-user-link
{
.gpg-popover-user-link
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
$gl-padding
/
2
;
text-decoration
:
none
;
text-decoration
:
none
;
color
:
$gl-text-color
;
color
:
$gl-text-color
;
}
}
.gpg-popover-avatar
{
float
:
left
;
margin-bottom
:
$gl-padding
;
.avatar
{
margin-left
:
0
;
}
}
.gpg-popover-username
{
font-weight
:
bold
;
}
.commit
.gpg-popover-help-link
{
.commit
.gpg-popover-help-link
{
display
:
block
;
display
:
block
;
color
:
$link-color
;
color
:
$link-color
;
...
...
app/views/projects/commit/_invalid_signature_badge.html.haml
View file @
4c5d4a69
-
title
=
capture
do
-
title
=
capture
do
%i
{
class:
'fa fa-question-circle gpg-popover-icon invalid'
,
'aria-hidden'
=>
'true'
}
%i
{
class:
'fa fa-question-circle gpg-popover-icon invalid'
,
'aria-hidden'
=>
'true'
}
This commit was signed with an unverified signature.
%div
This commit was signed with an
<strong>
unverified
</strong>
signature.
-
locals
=
{
signature:
signature
,
title:
title
,
label:
'Unverified'
,
css_classes:
[
'invalid'
]
}
-
locals
=
{
signature:
signature
,
title:
title
,
label:
'Unverified'
,
css_classes:
[
'invalid'
]
}
...
...
app/views/projects/commit/_signature_badge.html.haml
View file @
4c5d4a69
-
css_classes
=
%w(btn status-box gpg-status-box)
+
css_classes
-
css_classes
=
%w(btn status-box gpg-status-box)
+
css_classes
-
title
=
capture
do
-
title
=
capture
do
.gpg-popover-
title
.gpg-popover-
status
=
title
=
title
-
content
=
capture
do
-
content
=
capture
do
.clearfix
.clearfix
=
content
=
content
GPG
k
ey ID:
GPG
K
ey ID:
=
signature
.
gpg_key_primary_keyid
=
signature
.
gpg_key_primary_keyid
=
link_to
(
'Learn about signing commits'
,
help_page_path
(
'workflow/gpg_signed_commits/index.md'
),
class:
'gpg-popover-help-link'
)
=
link_to
(
'Learn
more
about signing commits'
,
help_page_path
(
'workflow/gpg_signed_commits/index.md'
),
class:
'gpg-popover-help-link'
)
%button
{
class:
css_classes
,
data:
{
toggle:
'popover'
,
html:
'true'
,
placement:
'auto
bottom
'
,
title:
title
,
content:
content
}
}
%button
{
class:
css_classes
,
data:
{
toggle:
'popover'
,
html:
'true'
,
placement:
'auto
top
'
,
title:
title
,
content:
content
}
}
=
label
=
label
app/views/projects/commit/_valid_signature_badge.html.haml
View file @
4c5d4a69
-
title
=
capture
do
-
title
=
capture
do
%i
{
class:
'fa fa-check-circle gpg-popover-icon valid'
,
'aria-hidden'
=>
'true'
}
%i
{
class:
'fa fa-check-circle gpg-popover-icon valid'
,
'aria-hidden'
=>
'true'
}
This commit was signed with a verified signature.
%div
This commit was signed with a
<strong>
verified
</strong>
signature.
-
content
=
capture
do
-
content
=
capture
do
-
gpg_key
=
signature
.
gpg_key
-
gpg_key
=
signature
.
gpg_key
=
link_to
user_path
(
gpg_key
.
user
),
class:
'gpg-popover-user-link'
do
=
link_to
user_path
(
gpg_key
.
user
),
class:
'gpg-popover-user-link'
do
.gpg-popover-avatar
%div
=
user_avatar_without_link
(
user:
signature
.
gpg_key
.
user
,
size:
32
)
=
user_avatar_without_link
(
user:
signature
.
gpg_key
.
user
,
size:
32
)
.gpg-popover-username
%div
=
gpg_key
.
user
.
username
%strong
=
gpg_key
.
user
.
username
%div
=
gpg_key
.
user
.
name
%div
=
gpg_key
.
user
.
name
-
locals
=
{
signature:
signature
,
title:
title
,
content:
content
,
label:
'Verified'
,
css_classes:
[
'valid'
]
}
-
locals
=
{
signature:
signature
,
title:
title
,
content:
content
,
label:
'Verified'
,
css_classes:
[
'valid'
]
}
...
...
spec/features/commits_spec.rb
View file @
4c5d4a69
...
@@ -272,18 +272,18 @@ describe 'Commits' do
...
@@ -272,18 +272,18 @@ describe 'Commits' do
sign_in
(
user
)
sign_in
(
user
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:'signed-commits'
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:'signed-commits'
)
click_on
'Unverified'
,
match: :first
within
'.popover'
do
expect
(
page
).
to
have_content
'This commit was signed with an unverified signature.'
expect
(
page
).
to
have_content
"GPG Key ID:
#{
GpgHelpers
::
User2
.
primary_keyid
}
"
end
click_on
'Verified'
click_on
'Verified'
within
'.popover'
do
within
'.popover'
do
expect
(
page
).
to
have_content
'This commit was signed with a verified signature.'
expect
(
page
).
to
have_content
'This commit was signed with a verified signature.'
expect
(
page
).
to
have_content
'nannie.bernhard'
expect
(
page
).
to
have_content
'nannie.bernhard'
expect
(
page
).
to
have_content
'Nannie Bernhard'
expect
(
page
).
to
have_content
'Nannie Bernhard'
expect
(
page
).
to
have_content
"GPG key ID:
#{
GpgHelpers
::
User1
.
primary_keyid
}
"
expect
(
page
).
to
have_content
"GPG Key ID:
#{
GpgHelpers
::
User1
.
primary_keyid
}
"
end
click_on
'Unverified'
,
match: :first
within
'.popover'
do
expect
(
page
).
to
have_content
'This commit was signed with an unverified signature.'
expect
(
page
).
to
have_content
"GPG key ID:
#{
GpgHelpers
::
User2
.
primary_keyid
}
"
end
end
end
end
end
end
...
...
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