Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
80c92649
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
80c92649
编写于
4月 06, 2017
作者:
D
Dimitrie Hoekstra
提交者:
Annabel Dunstone Gray
4月 06, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Award emoji button smiley animation
上级
15429ea5
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
111 addition
and
8 deletion
+111
-8
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+2
-1
app/assets/stylesheets/framework/awards.scss
app/assets/stylesheets/framework/awards.scss
+56
-2
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+2
-0
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+38
-3
app/views/award_emoji/_awards_block.html.haml
app/views/award_emoji/_awards_block.html.haml
+3
-1
app/views/projects/notes/_note.html.haml
app/views/projects/notes/_note.html.haml
+3
-1
app/views/shared/icons/_emoji_slightly_smiling_face.svg
app/views/shared/icons/_emoji_slightly_smiling_face.svg
+1
-0
app/views/shared/icons/_emoji_smile.svg
app/views/shared/icons/_emoji_smile.svg
+1
-0
app/views/shared/icons/_emoji_smiley.svg
app/views/shared/icons/_emoji_smiley.svg
+1
-0
changelogs/unreleased/award-emoji-button-smiley-animation.yml
...gelogs/unreleased/award-emoji-button-smiley-animation.yml
+4
-0
未找到文件。
app/assets/javascripts/awards_handler.js
浏览文件 @
80c92649
...
...
@@ -263,7 +263,8 @@ AwardsHandler.prototype.addAward = function addAward(
this
.
addAwardToEmojiBar
(
votesBlock
,
normalizedEmoji
,
checkMutuality
);
return
typeof
callback
===
'
function
'
?
callback
()
:
undefined
;
});
return
$
(
'
.emoji-menu
'
).
removeClass
(
'
is-visible
'
);
$
(
'
.emoji-menu
'
).
removeClass
(
'
is-visible
'
);
$
(
'
.js-add-award.is-active
'
).
removeClass
(
'
is-active
'
);
};
AwardsHandler
.
prototype
.
addAwardToEmojiBar
=
function
addAwardToEmojiBar
(
...
...
app/assets/stylesheets/framework/awards.scss
浏览文件 @
80c92649
...
...
@@ -91,7 +91,7 @@
.award-menu-holder
{
display
:
inline-block
;
position
:
relativ
e
;
position
:
absolut
e
;
.tooltip
{
white-space
:
nowrap
;
...
...
@@ -117,11 +117,41 @@
&
.active
,
&
:hover
,
&
:active
{
&
:active
,
&
.is-active
{
background-color
:
$row-hover
;
border-color
:
$row-hover-border
;
box-shadow
:
none
;
outline
:
0
;
.award-control-icon
svg
{
background
:
$award-emoji-positive-add-bg
;
path
{
fill
:
$award-emoji-positive-add-lines
;
}
}
.award-control-icon-neutral
{
opacity
:
0
;
}
.award-control-icon-positive
{
opacity
:
1
;
transform
:
scale
(
1
.15
);
}
}
&
.is-active
{
.award-control-icon-positive
{
opacity
:
0
;
transform
:
scale
(
1
);
}
.award-control-icon-super-positive
{
opacity
:
1
;
transform
:
scale
(
1
);
}
}
&
.btn
{
...
...
@@ -162,9 +192,33 @@
color
:
$border-gray-normal
;
margin-top
:
1px
;
padding
:
0
2px
;
svg
{
margin-bottom
:
1px
;
height
:
18px
;
width
:
18px
;
border-radius
:
50%
;
path
{
fill
:
$border-gray-normal
;
}
}
}
.award-control-icon-positive
,
.award-control-icon-super-positive
{
position
:
absolute
;
left
:
7px
;
bottom
:
9px
;
opacity
:
0
;
@include
transition
(
opacity
,
transform
);
}
.award-control-text
{
vertical-align
:
middle
;
}
}
.note-awards
.award-control-icon-positive
{
left
:
6px
;
}
app/assets/stylesheets/framework/variables.scss
浏览文件 @
80c92649
...
...
@@ -293,6 +293,8 @@ $badge-color: $gl-text-color-secondary;
* Award emoji
*/
$award-emoji-menu-shadow
:
rgba
(
0
,
0
,
0
,.
175
);
$award-emoji-positive-add-bg
:
#fed159
;
$award-emoji-positive-add-lines
:
#bb9c13
;
/*
* Search Box
...
...
app/assets/stylesheets/pages/notes.scss
浏览文件 @
80c92649
...
...
@@ -398,13 +398,50 @@ ul.notes {
font-size
:
17px
;
}
&
:hover
{
svg
{
height
:
16px
;
width
:
16px
;
fill
:
$gray-darkest
;
vertical-align
:
text-top
;
}
.award-control-icon-positive
,
.award-control-icon-super-positive
{
position
:
absolute
;
margin-left
:
-20px
;
opacity
:
0
;
}
&
:hover
,
&
.is-active
{
.danger-highlight
{
color
:
$gl-text-red
;
}
.link-highlight
{
color
:
$gl-link-color
;
svg
{
fill
:
$gl-link-color
;
}
}
.award-control-icon-neutral
{
opacity
:
0
;
}
.award-control-icon-positive
{
opacity
:
1
;
}
}
&
.is-active
{
.award-control-icon-positive
{
opacity
:
0
;
}
.award-control-icon-super-positive
{
opacity
:
1
;
}
}
}
...
...
@@ -508,7 +545,6 @@ ul.notes {
}
.line-resolve-all-container
{
.btn-group
{
margin-left
:
-4px
;
}
...
...
@@ -537,7 +573,6 @@ ul.notes {
fill
:
$gray-darkest
;
}
}
}
.line-resolve-all
{
...
...
app/views/award_emoji/_awards_block.html.haml
浏览文件 @
80c92649
...
...
@@ -13,5 +13,7 @@
%button
.btn.award-control.has-tooltip.js-add-award
{
type:
'button'
,
'aria-label'
:
'Add emoji'
,
data:
{
title:
'Add emoji'
,
placement:
"bottom"
}
}
=
icon
(
'smile-o'
,
class:
"award-control-icon award-control-icon-normal"
)
%span
{
class:
"award-control-icon award-control-icon-neutral"
}=
custom_icon
(
'emoji_slightly_smiling_face'
)
%span
{
class:
"award-control-icon award-control-icon-positive"
}=
custom_icon
(
'emoji_smiley'
)
%span
{
class:
"award-control-icon award-control-icon-super-positive"
}=
custom_icon
(
'emoji_smile'
)
=
icon
(
'spinner spin'
,
class:
"award-control-icon award-control-icon-loading"
)
app/views/projects/notes/_note.html.haml
浏览文件 @
80c92649
...
...
@@ -59,7 +59,9 @@
-
if
note
.
emoji_awardable?
=
link_to
'#'
,
title:
'Award Emoji'
,
class:
'note-action-button note-emoji-button js-add-award js-note-emoji'
,
data:
{
position:
'right'
}
do
=
icon
(
'spinner spin'
)
=
icon
(
'smile-o'
,
class:
'link-highlight'
)
%span
{
class:
"link-highlight award-control-icon-neutral"
}=
custom_icon
(
'emoji_slightly_smiling_face'
)
%span
{
class:
"link-highlight award-control-icon-positive"
}=
custom_icon
(
'emoji_smiley'
)
%span
{
class:
"link-highlight award-control-icon-super-positive"
}=
custom_icon
(
'emoji_smile'
)
-
if
note_editable
=
link_to
'#'
,
title:
'Edit comment'
,
class:
'note-action-button js-note-edit'
do
...
...
app/views/shared/icons/_emoji_slightly_smiling_face.svg
0 → 100644
浏览文件 @
80c92649
<svg
width=
"18"
height=
"18"
viewBox=
"0 0 18 18"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M13.29 11.098a4.328 4.328 0 0 1-1.618 2.285c-.79.578-1.68.867-2.672.867-.992 0-1.883-.29-2.672-.867a4.328 4.328 0 0 1-1.617-2.285.721.721 0 0 1 .047-.569.715.715 0 0 1 .445-.369.721.721 0 0 1 .568.047.715.715 0 0 1 .37.445c.195.625.556 1.131 1.084 1.518A2.93 2.93 0 0 0 9 12.75a2.93 2.93 0 0 0 1.775-.58 2.913 2.913 0 0 0 1.084-1.518.711.711 0 0 1 .375-.445.737.737 0 0 1 .575-.047c.195.063.34.186.433.37.094.183.11.372.047.568zM7.5 6c0 .414-.146.768-.44 1.06-.292.294-.646.44-1.06.44-.414 0-.768-.146-1.06-.44A1.445 1.445 0 0 1 4.5 6c0-.414.146-.768.44-1.06.292-.294.646-.44 1.06-.44.414 0 .768.146 1.06.44.294.292.44.646.44 1.06zm6 0c0 .414-.146.768-.44 1.06-.292.294-.646.44-1.06.44-.414 0-.768-.146-1.06-.44A1.445 1.445 0 0 1 10.5 6c0-.414.146-.768.44-1.06.292-.294.646-.44 1.06-.44.414 0 .768.146 1.06.44.294.292.44.646.44 1.06zm3 3a7.29 7.29 0 0 0-.598-2.912 7.574 7.574 0 0 0-1.6-2.39 7.574 7.574 0 0 0-2.39-1.6A7.29 7.29 0 0 0 9 1.5a7.29 7.29 0 0 0-2.912.598 7.574 7.574 0 0 0-2.39 1.6 7.574 7.574 0 0 0-1.6 2.39A7.29 7.29 0 0 0 1.5 9c0 1.016.2 1.986.598 2.912a7.574 7.574 0 0 0 1.6 2.39 7.574 7.574 0 0 0 2.39 1.6A7.29 7.29 0 0 0 9 16.5a7.29 7.29 0 0 0 2.912-.598 7.574 7.574 0 0 0 2.39-1.6 7.574 7.574 0 0 0 1.6-2.39A7.29 7.29 0 0 0 16.5 9zM18 9a8.804 8.804 0 0 1-1.207 4.518 8.96 8.96 0 0 1-3.275 3.275A8.804 8.804 0 0 1 9 18a8.804 8.804 0 0 1-4.518-1.207 8.96 8.96 0 0 1-3.275-3.275A8.804 8.804 0 0 1 0 9c0-1.633.402-3.139 1.207-4.518a8.96 8.96 0 0 1 3.275-3.275A8.804 8.804 0 0 1 9 0c1.633 0 3.139.402 4.518 1.207a8.96 8.96 0 0 1 3.275 3.275A8.804 8.804 0 0 1 18 9z"
fill-rule=
"evenodd"
/></svg>
app/views/shared/icons/_emoji_smile.svg
0 → 100644
浏览文件 @
80c92649
<svg
width=
"18"
height=
"18"
viewBox=
"0 0 18 18"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M13.29 11.098a4.328 4.328 0 0 1-1.618 2.285c-.79.578-1.68.867-2.672.867-.992 0-1.883-.29-2.672-.867a4.328 4.328 0 0 1-1.617-2.285.721.721 0 0 1 .047-.569.715.715 0 0 1 .445-.369c.195-.062 7.41-.062 7.606 0 .195.063.34.186.433.37.094.183.11.372.047.568zM14 6.37c0 .398-.04.755-.513.755-.473 0-.498-.272-1.237-.272-.74 0-.74.215-1.165.215-.425 0-.585-.3-.585-.698 0-.397.17-.736.513-1.017.341-.281.754-.422 1.237-.422.483 0 .896.14 1.237.422.342.28.513.62.513 1.017zm-6.5 0c0 .398-.04.755-.513.755-.473 0-.498-.272-1.237-.272-.74 0-.74.215-1.165.215-.425 0-.585-.3-.585-.698 0-.397.17-.736.513-1.017.341-.281.754-.422 1.237-.422.483 0 .896.14 1.237.422.342.28.513.62.513 1.017zm9 2.63a7.29 7.29 0 0 0-.598-2.912 7.574 7.574 0 0 0-1.6-2.39 7.574 7.574 0 0 0-2.39-1.6A7.29 7.29 0 0 0 9 1.5a7.29 7.29 0 0 0-2.912.598 7.574 7.574 0 0 0-2.39 1.6 7.574 7.574 0 0 0-1.6 2.39A7.29 7.29 0 0 0 1.5 9c0 1.016.2 1.986.598 2.912a7.574 7.574 0 0 0 1.6 2.39 7.574 7.574 0 0 0 2.39 1.6A7.29 7.29 0 0 0 9 16.5a7.29 7.29 0 0 0 2.912-.598 7.574 7.574 0 0 0 2.39-1.6 7.574 7.574 0 0 0 1.6-2.39A7.29 7.29 0 0 0 16.5 9zM18 9a8.804 8.804 0 0 1-1.207 4.518 8.96 8.96 0 0 1-3.275 3.275A8.804 8.804 0 0 1 9 18a8.804 8.804 0 0 1-4.518-1.207 8.96 8.96 0 0 1-3.275-3.275A8.804 8.804 0 0 1 0 9c0-1.633.402-3.139 1.207-4.518a8.96 8.96 0 0 1 3.275-3.275A8.804 8.804 0 0 1 9 0c1.633 0 3.139.402 4.518 1.207a8.96 8.96 0 0 1 3.275 3.275A8.804 8.804 0 0 1 18 9z"
fill-rule=
"evenodd"
/></svg>
app/views/shared/icons/_emoji_smiley.svg
0 → 100644
浏览文件 @
80c92649
<svg
width=
"18"
height=
"18"
viewBox=
"0 0 18 18"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M13.29 11.098a4.328 4.328 0 0 1-1.618 2.285c-.79.578-1.68.867-2.672.867-.992 0-1.883-.29-2.672-.867a4.328 4.328 0 0 1-1.617-2.285.721.721 0 0 1 .047-.569.715.715 0 0 1 .445-.369c.195-.062 7.41-.062 7.606 0 .195.063.34.186.433.37.094.183.11.372.047.568h.001zM7.5 6c0 .414-.146.768-.44 1.06A1.44 1.44 0 0 1 6 7.5a1.44 1.44 0 0 1-1.06-.44A1.445 1.445 0 0 1 4.5 6c0-.414.146-.768.44-1.06A1.44 1.44 0 0 1 6 4.5c.414 0 .768.146 1.06.44.294.292.44.646.44 1.06zm6 0c0 .414-.146.768-.44 1.06A1.44 1.44 0 0 1 12 7.5a1.44 1.44 0 0 1-1.06-.44A1.445 1.445 0 0 1 10.5 6c0-.414.146-.768.44-1.06A1.44 1.44 0 0 1 12 4.5c.414 0 .768.146 1.06.44.294.292.44.646.44 1.06zm3 3a7.29 7.29 0 0 0-.598-2.912 7.574 7.574 0 0 0-1.6-2.39 7.574 7.574 0 0 0-2.39-1.6A7.29 7.29 0 0 0 9 1.5a7.29 7.29 0 0 0-2.912.598 7.574 7.574 0 0 0-2.39 1.6 7.574 7.574 0 0 0-1.6 2.39A7.29 7.29 0 0 0 1.5 9c0 1.016.2 1.986.598 2.912a7.574 7.574 0 0 0 1.6 2.39 7.574 7.574 0 0 0 2.39 1.6c.92.397 1.91.6 2.912.598a7.29 7.29 0 0 0 2.912-.598 7.574 7.574 0 0 0 2.39-1.6 7.574 7.574 0 0 0 1.6-2.39c.397-.92.6-1.91.598-2.912zM18 9a8.804 8.804 0 0 1-1.207 4.518 8.96 8.96 0 0 1-3.275 3.275A8.804 8.804 0 0 1 9 18a8.804 8.804 0 0 1-4.518-1.207 8.96 8.96 0 0 1-3.275-3.275A8.804 8.804 0 0 1 0 9c0-1.633.402-3.139 1.207-4.518a8.96 8.96 0 0 1 3.275-3.275A8.804 8.804 0 0 1 9 0c1.633 0 3.139.402 4.518 1.207a8.96 8.96 0 0 1 3.275 3.275A8.804 8.804 0 0 1 18 9z"
fill-rule=
"nonzero"
/></svg>
changelogs/unreleased/award-emoji-button-smiley-animation.yml
0 → 100644
浏览文件 @
80c92649
---
title
:
Added award emoji animation and improved active state
merge_request
:
author
:
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录