BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
06c33095
Commit
06c33095
authored
Aug 10, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use v-else instead of duplicating logic
Fix
http://192.168.1.135:3000/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/broadcast_message.js
parent
d59aed94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+17
-3
repo_helper.js
app/assets/javascripts/repo/helpers/repo_helper.js
+1
-1
No files found.
app/assets/javascripts/repo/components/repo_preview.vue
View file @
06c33095
...
...
@@ -30,9 +30,23 @@ export default {
<
template
>
<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
v-if=
"!activeFile.render_error"
v-html=
"activeFile.html"
>
</div>
<div
v-else-if=
"activeFile.tooLarge"
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
v-else
class=
"vertical-center render-error"
>
<p
class=
"text-center"
>
The source could not be displayed because a rendering error occured. You can
<a
:href=
"activeFile.raw_path"
>
download
</a>
it instead.
</p>
</div>
</div>
</
template
>
app/assets/javascripts/repo/helpers/repo_helper.js
View file @
06c33095
...
...
@@ -190,7 +190,7 @@ const RepoHelper = {
newFile
.
url
=
file
.
url
||
location
.
pathname
;
newFile
.
url
=
file
.
url
;
if
(
newFile
.
render_error
===
'too_large'
)
{
if
(
newFile
.
render_error
===
'too_large'
||
newFile
.
render_error
===
'collapsed'
)
{
newFile
.
tooLarge
=
true
;
}
newFile
.
newContent
=
''
;
...
...
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