diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-15 00:09:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-15 00:09:09 +0300 |
commit | e30d680b42eff52d9eb2a79ff7ed40bd8bb88d21 (patch) | |
tree | b34a1a9e596281dc8ef8d5c88553e9cf79ab21d7 /app/assets/javascripts/batch_comments | |
parent | 844e3ef899c87d9e04cf8b89c8690afb013ba425 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/batch_comments')
-rw-r--r-- | app/assets/javascripts/batch_comments/components/preview_item.vue | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/javascripts/batch_comments/components/preview_item.vue b/app/assets/javascripts/batch_comments/components/preview_item.vue index 756bcfdb3d0..753608cf6f7 100644 --- a/app/assets/javascripts/batch_comments/components/preview_item.vue +++ b/app/assets/javascripts/batch_comments/components/preview_item.vue @@ -41,13 +41,17 @@ export default { titleText() { const file = this.discussion ? this.discussion.diff_file : this.draft; - if (file) { + if (file?.file_path) { return file.file_path; } - return sprintf(__("%{authorsName}'s thread"), { - authorsName: this.discussion.notes.find((note) => !note.system).author.name, - }); + if (this.discussion) { + return sprintf(__("%{authorsName}'s thread"), { + authorsName: this.discussion.notes.find((note) => !note.system).author.name, + }); + } + + return __('Your new comment'); }, linePosition() { if (this.position?.position_type === IMAGE_DIFF_POSITION_TYPE) { @@ -94,7 +98,7 @@ export default { <span class="review-preview-item-header"> <gl-icon class="flex-shrink-0" :name="iconName" /> <span class="bold text-nowrap gl-align-items-center"> - <span class="review-preview-item-header-text block-truncated"> + <span class="review-preview-item-header-text block-truncated gl-ml-2"> {{ titleText }} </span> <template v-if="showLinePosition"> |