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
4d18e200
Commit
4d18e200
authored
Oct 26, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed render_error not being hooked up correctly
[ci skip]
parent
bdac5569
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
34 deletions
+9
-34
app/assets/javascripts/repo/components/repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+4
-4
app/assets/javascripts/repo/stores/getters.js
app/assets/javascripts/repo/stores/getters.js
+1
-1
app/assets/javascripts/repo/stores/mutations/file.js
app/assets/javascripts/repo/stores/mutations/file.js
+1
-0
app/assets/javascripts/repo/stores/utils.js
app/assets/javascripts/repo/stores/utils.js
+3
-0
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+0
-29
No files found.
app/assets/javascripts/repo/components/repo_preview.vue
View file @
4d18e200
...
@@ -33,21 +33,21 @@ export default {
...
@@ -33,21 +33,21 @@ export default {
<
template
>
<
template
>
<div>
<div>
<div
<div
v-if=
"!activeFile.render
_e
rror"
v-if=
"!activeFile.render
E
rror"
v-html=
"activeFile.html"
>
v-html=
"activeFile.html"
>
</div>
</div>
<div
<div
v-else-if=
"activeFile.
tooLarge
"
v-else-if=
"activeFile.
renderError == 'too_large'
"
class=
"vertical-center render-error"
>
class=
"vertical-center render-error"
>
<p
class=
"text-center"
>
<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.
The source could not be displayed because it is too large. You can
<a
:href=
"activeFile.raw
Path"
download
>
download
</a>
it instead.
</p>
</p>
</div>
</div>
<div
<div
v-else
v-else
class=
"vertical-center render-error"
>
class=
"vertical-center render-error"
>
<p
class=
"text-center"
>
<p
class=
"text-center"
>
The source could not be displayed because a rendering error occurred. You can
<a
:href=
"activeFile.raw
_path"
>
download
</a>
it instead.
The source could not be displayed because a rendering error occurred. You can
<a
:href=
"activeFile.raw
Path"
download
>
download
</a>
it instead.
</p>
</p>
</div>
</div>
</div>
</div>
...
...
app/assets/javascripts/repo/stores/getters.js
View file @
4d18e200
...
@@ -35,5 +35,5 @@ export const canEditFile = (state) => {
...
@@ -35,5 +35,5 @@ export const canEditFile = (state) => {
return
state
.
canCommit
&&
return
state
.
canCommit
&&
state
.
onTopOfBranch
&&
state
.
onTopOfBranch
&&
openedFiles
.
length
&&
openedFiles
.
length
&&
(
currentActiveFile
&&
!
currentActiveFile
.
render
_e
rror
&&
!
currentActiveFile
.
binary
);
(
currentActiveFile
&&
!
currentActiveFile
.
render
E
rror
&&
!
currentActiveFile
.
binary
);
};
};
app/assets/javascripts/repo/stores/mutations/file.js
View file @
4d18e200
...
@@ -26,6 +26,7 @@ export default {
...
@@ -26,6 +26,7 @@ export default {
rawPath
:
data
.
raw_path
,
rawPath
:
data
.
raw_path
,
binary
:
data
.
binary
,
binary
:
data
.
binary
,
html
:
data
.
html
,
html
:
data
.
html
,
renderError
:
data
.
render_error
,
});
});
},
},
[
types
.
SET_FILE_RAW_DATA
](
state
,
{
file
,
raw
})
{
[
types
.
SET_FILE_RAW_DATA
](
state
,
{
file
,
raw
})
{
...
...
app/assets/javascripts/repo/stores/utils.js
View file @
4d18e200
...
@@ -23,6 +23,7 @@ export const dataStructure = () => ({
...
@@ -23,6 +23,7 @@ export const dataStructure = () => ({
raw
:
''
,
raw
:
''
,
content
:
''
,
content
:
''
,
parentTreeUrl
:
''
,
parentTreeUrl
:
''
,
renderError
:
false
,
});
});
export
const
decorateData
=
(
entity
,
projectUrl
=
''
)
=>
{
export
const
decorateData
=
(
entity
,
projectUrl
=
''
)
=>
{
...
@@ -36,6 +37,7 @@ export const decorateData = (entity, projectUrl = '') => {
...
@@ -36,6 +37,7 @@ export const decorateData = (entity, projectUrl = '') => {
tree_url
,
tree_url
,
path
,
path
,
tempFile
,
tempFile
,
renderError
,
active
=
false
,
active
=
false
,
opened
=
false
,
opened
=
false
,
changed
=
false
,
changed
=
false
,
...
@@ -58,6 +60,7 @@ export const decorateData = (entity, projectUrl = '') => {
...
@@ -58,6 +60,7 @@ export const decorateData = (entity, projectUrl = '') => {
active
,
active
,
parentTreeUrl
,
parentTreeUrl
,
changed
,
changed
,
renderError
,
// eslint-disable-next-line camelcase
// eslint-disable-next-line camelcase
lastCommit
:
last_commit
?
{
lastCommit
:
last_commit
?
{
url
:
`
${
projectUrl
}
/commit/
${
last_commit
.
id
}
`
,
url
:
`
${
projectUrl
}
/commit/
${
last_commit
.
id
}
`
,
...
...
app/assets/stylesheets/pages/repo.scss
View file @
4d18e200
.monaco-loader
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background
:
$black-transparent
;
}
.modal.popup-dialog
{
.modal.popup-dialog
{
display
:
block
;
display
:
block
;
background-color
:
$black-transparent
;
background-color
:
$black-transparent
;
...
@@ -313,23 +304,3 @@
...
@@ -313,23 +304,3 @@
width
:
100%
;
width
:
100%
;
}
}
}
}
@keyframes
swipeRightAppear
{
0
%
{
transform
:
scaleX
(
0
.00
);
}
100
%
{
transform
:
scaleX
(
1
.00
);
}
}
@keyframes
swipeRightDissapear
{
0
%
{
transform
:
scaleX
(
1
.00
);
}
100
%
{
transform
:
scaleX
(
0
.00
);
}
}
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