diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/notes/components/noteable_note.vue | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/notes/components/noteable_note.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/noteable_note.vue | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue index eaa64cf7c01..4343fac3cfa 100644 --- a/app/assets/javascripts/notes/components/noteable_note.vue +++ b/app/assets/javascripts/notes/components/noteable_note.vue @@ -1,21 +1,18 @@ <script> +import { GlSprintf, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; import $ from 'jquery'; -import { mapGetters, mapActions } from 'vuex'; import { escape } from 'lodash'; -import { GlSprintf, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; -import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; +import { mapGetters, mapActions } from 'vuex'; +import { INLINE_DIFF_LINES_KEY } from '~/diffs/constants'; +import httpStatusCodes from '~/lib/utils/http_status'; import { truncateSha } from '~/lib/utils/text_utility'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; -import { __, s__, sprintf } from '../../locale'; import { deprecatedCreateFlash as Flash } from '../../flash'; +import { __, s__, sprintf } from '../../locale'; import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; -import noteHeader from './note_header.vue'; -import noteActions from './note_actions.vue'; -import NoteBody from './note_body.vue'; import eventHub from '../event_hub'; import noteable from '../mixins/noteable'; import resolvable from '../mixins/resolvable'; -import httpStatusCodes from '~/lib/utils/http_status'; import { getStartLineNumber, getEndLineNumber, @@ -23,7 +20,9 @@ import { commentLineOptions, formatLineRange, } from './multiline_comment_utils'; -import { INLINE_DIFF_LINES_KEY } from '~/diffs/constants'; +import noteActions from './note_actions.vue'; +import NoteBody from './note_body.vue'; +import noteHeader from './note_header.vue'; export default { name: 'NoteableNote', @@ -38,7 +37,7 @@ export default { directives: { SafeHtml, }, - mixins: [noteable, resolvable, glFeatureFlagsMixin()], + mixins: [noteable, resolvable], props: { note: { type: Object, @@ -160,7 +159,6 @@ export default { }, showMultiLineComment() { if ( - !this.glFeatures.multilineComments || !this.discussionRoot || this.startLineNumber.length === 0 || this.endLineNumber.length === 0 @@ -289,6 +287,7 @@ export default { }; this.isRequesting = true; this.oldContent = this.note.note_html; + // eslint-disable-next-line vue/no-mutating-props this.note.note_html = escape(noteText); this.updateNote(data) @@ -321,6 +320,7 @@ export default { } this.$refs.noteBody.resetAutoSave(); if (this.oldContent) { + // eslint-disable-next-line vue/no-mutating-props this.note.note_html = this.oldContent; this.oldContent = null; } @@ -330,6 +330,7 @@ export default { recoverNoteContent(noteText) { // we need to do this to prevent noteForm inconsistent content warning // this is something we intentionally do so we need to recover the content + // eslint-disable-next-line vue/no-mutating-props this.note.note = noteText; const { noteBody } = this.$refs; if (noteBody) { @@ -428,6 +429,7 @@ export default { ref="noteBody" :note="note" :line="line" + :file="diffFile" :can-edit="note.current_user.can_edit" :is-editing="isEditing" :help-page-path="helpPagePath" |