Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
6d291cc3
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,体验更适合开发者的 AI 搜索 >>
提交
6d291cc3
编写于
7月 05, 2018
作者:
T
Tim Zallmann
提交者:
Filipa Lacerda
7月 05, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
File Icons in Merge Requests
上级
afb9327d
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
14 addition
and
10 deletion
+14
-10
app/assets/javascripts/diffs/components/diff_file_header.vue
app/assets/javascripts/diffs/components/diff_file_header.vue
+9
-5
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+1
-1
spec/javascripts/diffs/components/diff_file_header_spec.js
spec/javascripts/diffs/components/diff_file_header_spec.js
+4
-4
未找到文件。
app/assets/javascripts/diffs/components/diff_file_header.vue
浏览文件 @
6d291cc3
...
...
@@ -2,6 +2,7 @@
import
_
from
'
underscore
'
;
import
ClipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
FileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
import
Tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
...
...
@@ -12,6 +13,7 @@ export default {
ClipboardButton
,
EditButton
,
Icon
,
FileIcon
,
},
directives
:
{
Tooltip
,
...
...
@@ -139,18 +141,20 @@ export default {
:name=
"collapseIcon"
:size=
"16"
aria-hidden=
"true"
class=
"diff-toggle-caret"
class=
"diff-toggle-caret
append-right-5
"
@
click.stop=
"handleToggle"
/>
<a
ref=
"titleWrapper"
:href=
"titleLink"
class=
"append-right-4"
>
<
i
:
class=
"`fa-$
{icon}`
"
class="fa fa-fw
"
<
file-icon
:
file-name=
"filePath
"
:size=
"18
"
aria-hidden=
"true"
>
</i>
css-classes=
"js-file-icon append-right-5"
/>
<span
v-if=
"diffFile.renamedFile"
>
<strong
v-tooltip
...
...
app/assets/stylesheets/pages/diff.scss
浏览文件 @
6d291cc3
...
...
@@ -15,7 +15,7 @@
}
svg
{
vertical-align
:
text-bottom
;
vertical-align
:
middle
;
}
}
...
...
spec/javascripts/diffs/components/diff_file_header_spec.js
浏览文件 @
6d291cc3
...
...
@@ -280,11 +280,11 @@ describe('diff_file_header', () => {
});
});
it
(
'
displays an icon in the title
'
,
()
=>
{
it
(
'
displays an
file
icon in the title
'
,
()
=>
{
vm
=
mountComponent
(
Component
,
props
);
const
icon
=
vm
.
$el
.
querySelector
(
`i[class="fa fa-fw fa-
${
vm
.
icon
}
"]`
);
expect
(
icon
).
not
.
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'
svg.js-file-icon use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
ruby
'
,
);
});
describe
(
'
file paths
'
,
()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录