From a09983ae35713f5a2bbb100981116d31ce99826e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Jul 2020 12:26:25 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-2-stable-ee --- .../javascripts/notes/components/comment_form.vue | 42 ++++++------ .../notes/components/discussion_notes.vue | 10 ++- .../notes/components/multiline_comment_form.vue | 45 ++++++++++-- .../notes/components/multiline_comment_utils.js | 78 +++++++++++++++++---- .../javascripts/notes/components/note_actions.vue | 21 +++--- .../javascripts/notes/components/note_form.vue | 18 +++-- .../javascripts/notes/components/noteable_note.vue | 79 ++++++++++++++-------- .../notes/components/sort_discussion.vue | 5 +- .../notes/mixins/diff_line_note_form.js | 5 ++ .../notes/mixins/discussion_navigation.js | 13 +++- app/assets/javascripts/notes/stores/actions.js | 46 +++++++++++-- .../javascripts/notes/stores/modules/index.js | 10 +++ .../javascripts/notes/stores/mutation_types.js | 3 + app/assets/javascripts/notes/stores/mutations.js | 12 ++++ app/assets/javascripts/notes/stores/utils.js | 8 +++ 15 files changed, 302 insertions(+), 93 deletions(-) (limited to 'app/assets/javascripts/notes') diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 16dcde46262..ac93d3df654 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -17,7 +17,7 @@ import { import { refreshUserMergeRequestCounts } from '~/commons/nav/user_merge_requests'; import * as constants from '../constants'; import eventHub from '../event_hub'; -import issueWarning from '../../vue_shared/components/issue/issue_warning.vue'; +import NoteableWarning from '../../vue_shared/components/notes/noteable_warning.vue'; import markdownField from '../../vue_shared/components/markdown/field.vue'; import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import loadingButton from '../../vue_shared/components/loading_button.vue'; @@ -28,8 +28,7 @@ import issuableStateMixin from '../mixins/issuable_state'; export default { name: 'CommentForm', components: { - issueWarning, - epicWarning: () => import('ee_component/vue_shared/components/epic/epic_warning.vue'), + NoteableWarning, noteSignedOutWidget, discussionLockedWidget, markdownField, @@ -126,9 +125,13 @@ export default { canToggleIssueState() { return ( this.getNoteableData.current_user.can_update && - this.getNoteableData.state !== constants.MERGED + this.getNoteableData.state !== constants.MERGED && + !this.closedAndLocked ); }, + closedAndLocked() { + return !this.isOpen && this.isLocked(this.getNoteableData); + }, endpoint() { return this.getNoteableData.create_note_path; }, @@ -350,14 +353,15 @@ export default {
- - + - + >