diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-16 21:10:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-16 21:10:51 +0300 |
commit | e684f438e60b801b4eb8b19dd9489dce84503c03 (patch) | |
tree | 115e9d137f570580b17825ed13057d663a0761c0 /app/assets/javascripts/notes | |
parent | d872c89ce4828a16d72ddeed8695077fdcaf7b30 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes')
3 files changed, 14 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes/components/comment_field_layout.vue b/app/assets/javascripts/notes/components/comment_field_layout.vue index 47d14783d5d..9638c20e28c 100644 --- a/app/assets/javascripts/notes/components/comment_field_layout.vue +++ b/app/assets/javascripts/notes/components/comment_field_layout.vue @@ -14,6 +14,11 @@ export default { type: Object, required: true, }, + noteIsConfidential: { + type: Boolean, + required: false, + default: false, + }, noteableType: { type: String, required: false, @@ -38,6 +43,9 @@ export default { emailParticipants() { return this.noteableData.issue_email_participants?.map(({ email }) => email) || []; }, + showEmailParticipantsWarning() { + return this.emailParticipants.length && !this.noteIsConfidential; + }, }, }; </script> @@ -61,7 +69,7 @@ export default { /> <slot></slot> <email-participants-warning - v-if="emailParticipants.length" + v-if="showEmailParticipantsWarning" class="gl-border-t-1 gl-border-t-solid gl-border-t-gray-100 gl-rounded-base gl-rounded-top-left-none! gl-rounded-top-right-none!" :emails="emailParticipants" /> diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 9504ed78778..2ebebd76e1e 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -380,6 +380,7 @@ export default { <comment-field-layout :with-alert-container="true" :noteable-data="getNoteableData" + :note-is-confidential="noteIsConfidential" :noteable-type="noteableType" > <markdown-field diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue index 4ce81219f11..f2336e1b6f5 100644 --- a/app/assets/javascripts/notes/components/note_form.vue +++ b/app/assets/javascripts/notes/components/note_form.vue @@ -326,7 +326,10 @@ export default { ></div> <div class="flash-container timeline-content"></div> <form :data-line-code="lineCode" class="edit-note common-note-form js-quick-submit gfm-form"> - <comment-field-layout :noteable-data="getNoteableData"> + <comment-field-layout + :noteable-data="getNoteableData" + :note-is-confidential="discussion.confidential" + > <markdown-field :markdown-preview-path="markdownPreviewPath" :markdown-docs-path="markdownDocsPath" |