Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-18 06:09:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-18 06:09:21 +0300
commitcfaf98a3b214c773f058ed9648314e4f147bbba4 (patch)
treec02a6855511a65696890c21270da5911896beff2 /app/assets/javascripts/diffs
parentc48065a833f9ead3357c48ea077165c15e8d585c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r--app/assets/javascripts/diffs/components/diff_view.vue18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_view.vue b/app/assets/javascripts/diffs/components/diff_view.vue
index 8747678e69b..84429f62a1c 100644
--- a/app/assets/javascripts/diffs/components/diff_view.vue
+++ b/app/assets/javascripts/diffs/components/diff_view.vue
@@ -51,6 +51,14 @@ export default {
);
},
},
+ methods: {
+ showCommentLeft(line) {
+ return !this.inline || line.left;
+ },
+ showCommentRight(line) {
+ return !this.inline || (line.right && !line.left);
+ },
+ },
userColorScheme: window.gon.user_color_scheme,
};
</script>
@@ -93,10 +101,7 @@ export default {
:class="line.commentRowClasses"
class="diff-grid-comments diff-tr notes_holder"
>
- <div
- v-if="!inline || (line.left && line.left.discussions.length)"
- class="diff-td notes-content parallel old"
- >
+ <div v-if="showCommentLeft(line)" class="diff-td notes-content parallel old">
<diff-comment-cell
v-if="line.left"
:line="line.left"
@@ -106,10 +111,7 @@ export default {
line-position="left"
/>
</div>
- <div
- v-if="!inline || (line.right && line.right.discussions.length)"
- class="diff-td notes-content parallel new"
- >
+ <div v-if="showCommentRight(line)" class="diff-td notes-content parallel new">
<diff-comment-cell
v-if="line.right"
:line="line.right"