diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/assets/javascripts/notes/components/note_header.vue | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/assets/javascripts/notes/components/note_header.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/note_header.vue | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue index 71d767c3b95..11b427b9346 100644 --- a/app/assets/javascripts/notes/components/note_header.vue +++ b/app/assets/javascripts/notes/components/note_header.vue @@ -6,9 +6,11 @@ import { GlSafeHtmlDirective as SafeHtml, } from '@gitlab/ui'; import { mapActions } from 'vuex'; -import { __ } from '~/locale'; +import { __, s__ } from '~/locale'; import timeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; -import UserNameWithStatus from '../../sidebar/components/assignees/user_name_with_status.vue'; +import UserNameWithStatus from '~/sidebar/components/assignees/user_name_with_status.vue'; + +import { NOTEABLE_TYPE_MAPPING } from '../constants'; export default { safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] }, @@ -45,6 +47,11 @@ export default { required: false, default: null, }, + noteableType: { + type: String, + required: false, + default: '', + }, includeToggle: { type: Boolean, required: false, @@ -103,6 +110,15 @@ export default { authorName() { return this.author.name; }, + noteConfidentialityTooltip() { + if ( + this.noteableType === NOTEABLE_TYPE_MAPPING.Issue || + this.noteableType === NOTEABLE_TYPE_MAPPING.MergeRequest + ) { + return s__('Notes|This comment is confidential and only visible to project members'); + } + return s__('Notes|This comment is confidential and only visible to group members'); + }, }, mounted() { this.emojiTitle = this.emojiElement ? this.emojiElement.getAttribute('title') : ''; @@ -226,7 +242,7 @@ export default { data-testid="confidentialIndicator" name="eye-slash" :size="16" - :title="s__('Notes|This comment is confidential and only visible to project members')" + :title="noteConfidentialityTooltip" class="gl-ml-1 gl-text-orange-700 align-middle" /> <slot name="extra-controls"></slot> |