fixed render_error not being hooked up correctly
[ci skip]
This commit is contained in:
parent
bdac5569b1
commit
4d18e20011
5 changed files with 9 additions and 34 deletions
|
@ -33,21 +33,21 @@ export default {
|
|||
<template>
|
||||
<div>
|
||||
<div
|
||||
v-if="!activeFile.render_error"
|
||||
v-if="!activeFile.renderError"
|
||||
v-html="activeFile.html">
|
||||
</div>
|
||||
<div
|
||||
v-else-if="activeFile.tooLarge"
|
||||
v-else-if="activeFile.renderError == 'too_large'"
|
||||
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.
|
||||
The source could not be displayed because it is too large. You can <a :href="activeFile.rawPath" download>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 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.rawPath" download>download</a> it instead.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,5 +35,5 @@ export const canEditFile = (state) => {
|
|||
return state.canCommit &&
|
||||
state.onTopOfBranch &&
|
||||
openedFiles.length &&
|
||||
(currentActiveFile && !currentActiveFile.render_error && !currentActiveFile.binary);
|
||||
(currentActiveFile && !currentActiveFile.renderError && !currentActiveFile.binary);
|
||||
};
|
||||
|
|
|
@ -26,6 +26,7 @@ export default {
|
|||
rawPath: data.raw_path,
|
||||
binary: data.binary,
|
||||
html: data.html,
|
||||
renderError: data.render_error,
|
||||
});
|
||||
},
|
||||
[types.SET_FILE_RAW_DATA](state, { file, raw }) {
|
||||
|
|
|
@ -23,6 +23,7 @@ export const dataStructure = () => ({
|
|||
raw: '',
|
||||
content: '',
|
||||
parentTreeUrl: '',
|
||||
renderError: false,
|
||||
});
|
||||
|
||||
export const decorateData = (entity, projectUrl = '') => {
|
||||
|
@ -36,6 +37,7 @@ export const decorateData = (entity, projectUrl = '') => {
|
|||
tree_url,
|
||||
path,
|
||||
tempFile,
|
||||
renderError,
|
||||
active = false,
|
||||
opened = false,
|
||||
changed = false,
|
||||
|
@ -58,6 +60,7 @@ export const decorateData = (entity, projectUrl = '') => {
|
|||
active,
|
||||
parentTreeUrl,
|
||||
changed,
|
||||
renderError,
|
||||
// eslint-disable-next-line camelcase
|
||||
lastCommit: last_commit ? {
|
||||
url: `${projectUrl}/commit/${last_commit.id}`,
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
.monaco-loader {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: $black-transparent;
|
||||
}
|
||||
|
||||
.modal.popup-dialog {
|
||||
display: block;
|
||||
background-color: $black-transparent;
|
||||
|
@ -313,23 +304,3 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue