diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-12 09:09:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-12 09:09:05 +0300 |
commit | 8c9dc985b90c353b33cb829caf51f8320171bc15 (patch) | |
tree | 9a68886dbea1aefabddb46bbd3faf961eab22ae6 /app/assets/javascripts/diffs/components | |
parent | 500626a5c953ad81cfc3ed74bf0148c075617e58 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs/components')
-rw-r--r-- | app/assets/javascripts/diffs/components/diff_line_gutter_content.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue index 34aa15856d2..9eaceb8893c 100644 --- a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue +++ b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue @@ -1,5 +1,6 @@ <script> import { mapState, mapGetters, mapActions } from 'vuex'; +import { getParameterByName, parseBoolean } from '~/lib/utils/common_utils'; import Icon from '~/vue_shared/components/icon.vue'; import DiffGutterAvatars from './diff_gutter_avatars.vue'; import { LINE_POSITION_RIGHT } from '../constants'; @@ -98,7 +99,8 @@ export default { return this.showCommentButton && this.hasDiscussions; }, shouldRenderCommentButton() { - return this.isLoggedIn && this.showCommentButton; + const isDiffHead = parseBoolean(getParameterByName('diff_head')); + return !isDiffHead && this.isLoggedIn && this.showCommentButton; }, }, methods: { @@ -130,6 +132,7 @@ export default { </button> <a v-if="lineNumber" + ref="lineNumberRef" :data-linenumber="lineNumber" :href="lineHref" @click="setHighlightedRow(lineCode)" |