summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/components
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-07 21:08:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-07 21:08:39 +0000
commit0c6bc5443aa6c8f3e4becccb89fc0f135b4c64c8 (patch)
tree55f13e752e9061c1800cce510a52fc78b13282ca /app/assets/javascripts/notes/components
parentd7ce7307dca551759ffa972015875f8ebe476927 (diff)
downloadgitlab-ce-0c6bc5443aa6c8f3e4becccb89fc0f135b4c64c8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes/components')
-rw-r--r--app/assets/javascripts/notes/components/comment_form.vue4
-rw-r--r--app/assets/javascripts/notes/components/diff_discussion_header.vue4
-rw-r--r--app/assets/javascripts/notes/components/noteable_note.vue2
-rw-r--r--app/assets/javascripts/notes/components/toggle_replies_widget.vue4
4 files changed, 7 insertions, 7 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue
index 4ca32b9b005..9a809b71a58 100644
--- a/app/assets/javascripts/notes/components/comment_form.vue
+++ b/app/assets/javascripts/notes/components/comment_form.vue
@@ -1,7 +1,7 @@
<script>
import $ from 'jquery';
import { mapActions, mapGetters, mapState } from 'vuex';
-import _ from 'underscore';
+import { isEmpty } from 'lodash';
import Autosize from 'autosize';
import { __, sprintf } from '~/locale';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
@@ -161,7 +161,7 @@ export default {
'toggleStateButtonLoading',
]),
setIsSubmitButtonDisabled(note, isSubmitting) {
- if (!_.isEmpty(note) && !isSubmitting) {
+ if (!isEmpty(note) && !isSubmitting) {
this.isSubmitButtonDisabled = false;
} else {
this.isSubmitButtonDisabled = true;
diff --git a/app/assets/javascripts/notes/components/diff_discussion_header.vue b/app/assets/javascripts/notes/components/diff_discussion_header.vue
index 4c9075912ee..50d224a2f08 100644
--- a/app/assets/javascripts/notes/components/diff_discussion_header.vue
+++ b/app/assets/javascripts/notes/components/diff_discussion_header.vue
@@ -1,6 +1,6 @@
<script>
import { mapActions } from 'vuex';
-import _ from 'underscore';
+import { escape } from 'lodash';
import { s__, __, sprintf } from '~/locale';
import { truncateSha } from '~/lib/utils/text_utility';
@@ -45,7 +45,7 @@ export default {
return this.notes.length > 1 ? this.lastNote.created_at : null;
},
headerText() {
- const linkStart = `<a href="${_.escape(this.discussion.discussion_path)}">`;
+ const linkStart = `<a href="${escape(this.discussion.discussion_path)}">`;
const linkEnd = '</a>';
const { commit_id: commitId } = this.discussion;
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue
index b3dae69d0bc..dea782683f2 100644
--- a/app/assets/javascripts/notes/components/noteable_note.vue
+++ b/app/assets/javascripts/notes/components/noteable_note.vue
@@ -1,7 +1,7 @@
<script>
import $ from 'jquery';
import { mapGetters, mapActions } from 'vuex';
-import { escape } from 'underscore';
+import { escape } from 'lodash';
import draftMixin from 'ee_else_ce/notes/mixins/draft';
import { truncateSha } from '~/lib/utils/text_utility';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
diff --git a/app/assets/javascripts/notes/components/toggle_replies_widget.vue b/app/assets/javascripts/notes/components/toggle_replies_widget.vue
index f1b0b12bdce..dd132d4f608 100644
--- a/app/assets/javascripts/notes/components/toggle_replies_widget.vue
+++ b/app/assets/javascripts/notes/components/toggle_replies_widget.vue
@@ -1,5 +1,5 @@
<script>
-import _ from 'underscore';
+import { uniqBy } from 'lodash';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
@@ -27,7 +27,7 @@ export default {
uniqueAuthors() {
const authors = this.replies.map(reply => reply.author || {});
- return _.uniq(authors, author => author.username);
+ return uniqBy(authors, author => author.username);
},
className() {
return this.collapsed ? 'collapsed' : 'expanded';