Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
bc39218b
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,发现更多精彩内容 >>
提交
bc39218b
编写于
8月 07, 2017
作者:
J
Jacob Schatz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show warning for big files.
上级
7572aaf3
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
31 addition
and
5 deletion
+31
-5
app/assets/javascripts/repo/components/repo_edit_button.vue
app/assets/javascripts/repo/components/repo_edit_button.vue
+1
-1
app/assets/javascripts/repo/components/repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+6
-1
app/assets/javascripts/repo/helpers/repo_helper.js
app/assets/javascripts/repo/helpers/repo_helper.js
+9
-3
app/assets/stylesheets/framework/layout.scss
app/assets/stylesheets/framework/layout.scss
+8
-0
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+7
-0
未找到文件。
app/assets/javascripts/repo/components/repo_edit_button.vue
浏览文件 @
bc39218b
...
...
@@ -42,7 +42,7 @@ export default {
</
script
>
<
template
>
<button
class=
"btn btn-default"
@
click.prevent=
"editClicked"
v-cloak
v-if=
"isCommitable"
:disabled=
"binary"
>
<button
class=
"btn btn-default"
@
click.prevent=
"editClicked"
v-cloak
v-if=
"isCommitable
&& !activeFile.render_error
"
:disabled=
"binary"
>
<i
:class=
"buttonIcon"
></i>
<span>
{{
buttonLabel
}}
</span>
</button>
...
...
app/assets/javascripts/repo/components/repo_preview.vue
浏览文件 @
bc39218b
...
...
@@ -23,5 +23,10 @@ export default {
</
script
>
<
template
>
<div
v-html=
"activeFile.html"
></div>
<div>
<div
v-if=
"!activeFile.render_error"
v-html=
"activeFile.html"
></div>
<div
v-if=
"activeFile.render_error"
class=
"vertical-center render-error"
>
<p
class=
"text-center"
>
The source could not be displayed because it is too large. You can
<a
:href=
"activeFile.raw_path"
>
download
</a>
it instead.
</p>
</div>
</div>
</
template
>
app/assets/javascripts/repo/helpers/repo_helper.js
浏览文件 @
bc39218b
...
...
@@ -154,16 +154,19 @@ const RepoHelper = {
RepoHelper
.
setBinaryDataAsBase64
(
data
);
Store
.
setViewToPreview
();
}
else
if
(
!
Store
.
isPreviewView
())
{
if
(
!
data
.
render_error
){
Service
.
getRaw
(
data
.
raw_path
)
.
then
((
rawResponse
)
=>
{
Store
.
blobRaw
=
rawResponse
.
data
;
data
.
plain
=
rawResponse
.
data
;
RepoHelper
.
setFile
(
data
,
file
);
}).
catch
(
RepoHelper
.
loadingError
);
}
}
if
(
Store
.
isPreviewView
())
RepoHelper
.
setFile
(
data
,
file
);
if
(
Store
.
isPreviewView
()){
RepoHelper
.
setFile
(
data
,
file
);
}
// if the file tree is empty
if
(
Store
.
files
.
length
===
0
)
{
...
...
@@ -187,6 +190,9 @@ const RepoHelper = {
newFile
.
url
=
file
.
url
||
location
.
pathname
;
newFile
.
url
=
file
.
url
;
if
(
newFile
.
render_error
===
'
too_large
'
){
newFile
.
tooLarge
=
true
;
}
newFile
.
newContent
=
''
;
Store
.
addToOpenedFiles
(
newFile
);
...
...
app/assets/stylesheets/framework/layout.scss
浏览文件 @
bc39218b
...
...
@@ -128,3 +128,11 @@ of the body element here, we negate cascading side effects but allow momentum sc
[
v-cloak
]
{
display
:
none
;
}
.vertical-center
{
min-height
:
100%
;
min-height
:
100vh
;
display
:
flex
;
align-items
:
center
;
}
\ No newline at end of file
app/assets/stylesheets/pages/repo.scss
浏览文件 @
bc39218b
...
...
@@ -369,6 +369,13 @@
}
}
.render-error
{
min-height
:
calc
(
100vh
-
63px
);
p
{
width
:
100%
;
}
}
@keyframes
blockTextShine
{
0
%
{
transform
:
translateX
(
-468px
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录