Commit baa1d40c authored by Tim Zallmann's avatar Tim Zallmann

Added compute property to diff file + changed a for loop

parent b6a2e655
...@@ -46,6 +46,9 @@ export default { ...@@ -46,6 +46,9 @@ export default {
showExpandMessage() { showExpandMessage() {
return this.isCollapsed && !this.isLoadingCollapsedDiff && !this.file.tooLarge; return this.isCollapsed && !this.isLoadingCollapsedDiff && !this.file.tooLarge;
}, },
showLoadingIcon() {
return this.isLoadingCollapsedDiff || (!this.file.renderIt && !this.isCollapsed);
},
}, },
methods: { methods: {
...mapActions('diffs', ['loadCollapsedDiff']), ...mapActions('diffs', ['loadCollapsedDiff']),
...@@ -133,7 +136,7 @@ export default { ...@@ -133,7 +136,7 @@ export default {
:diff-file="file" :diff-file="file"
/> />
<loading-icon <loading-icon
v-if="isLoadingCollapsedDiff || (!file.renderIt && !isCollapsed)" v-else-if="showLoadingIcon"
class="diff-content loading" class="diff-content loading"
/> />
<div <div
......
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
if (file.highlightedDiffLines) { if (file.highlightedDiffLines) {
const linesLength = file.highlightedDiffLines.length; const linesLength = file.highlightedDiffLines.length;
let u = 0; let u;
for (u = 0; u < linesLength; u += 1) { for (u = 0; u < linesLength; u += 1) {
const line = file.highlightedDiffLines[u]; const line = file.highlightedDiffLines[u];
delete line.text; delete line.text;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment