diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /app/assets/javascripts/vue_shared/components/issue | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/issue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/issue/issue_warning.vue | 91 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue | 2 |
2 files changed, 1 insertions, 92 deletions
diff --git a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue b/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue deleted file mode 100644 index cb3cd18e5a7..00000000000 --- a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue +++ /dev/null @@ -1,91 +0,0 @@ -<script> -import { GlLink } from '@gitlab/ui'; -import { escape } from 'lodash'; -import { __, sprintf } from '~/locale'; -import icon from '../icon.vue'; - -function buildDocsLinkStart(path) { - return `<a href="${escape(path)}" target="_blank" rel="noopener noreferrer">`; -} - -export default { - components: { - icon, - GlLink, - }, - props: { - isLocked: { - type: Boolean, - default: false, - required: false, - }, - isConfidential: { - type: Boolean, - default: false, - required: false, - }, - lockedIssueDocsPath: { - type: String, - required: false, - default: '', - }, - confidentialIssueDocsPath: { - type: String, - required: false, - default: '', - }, - }, - computed: { - warningIcon() { - if (this.isConfidential) return 'eye-slash'; - if (this.isLocked) return 'lock'; - - return ''; - }, - isLockedAndConfidential() { - return this.isConfidential && this.isLocked; - }, - confidentialAndLockedDiscussionText() { - return sprintf( - __( - 'This issue is %{confidentialLinkStart}confidential%{linkEnd} and %{lockedLinkStart}locked%{linkEnd}.', - ), - { - confidentialLinkStart: buildDocsLinkStart(this.confidentialIssueDocsPath), - lockedLinkStart: buildDocsLinkStart(this.lockedIssueDocsPath), - linkEnd: '</a>', - }, - false, - ); - }, - }, -}; -</script> -<template> - <div class="issuable-note-warning"> - <icon v-if="!isLockedAndConfidential" :name="warningIcon" :size="16" class="icon inline" /> - - <span v-if="isLockedAndConfidential" ref="lockedAndConfidential"> - <span v-html="confidentialAndLockedDiscussionText"></span> - {{ - __("People without permission will never get a notification and won't be able to comment.") - }} - </span> - - <span v-else-if="isConfidential" ref="confidential"> - {{ __('This is a confidential issue.') }} - {{ __('People without permission will never get a notification.') }} - <gl-link :href="confidentialIssueDocsPath" target="_blank"> - {{ __('Learn more') }} - </gl-link> - </span> - - <span v-else-if="isLocked" ref="locked"> - {{ __('This issue is locked.') }} - {{ __('Only project members can comment.') }} - <gl-link :href="lockedIssueDocsPath" target="_blank"> - {{ __('Learn more') }} - </gl-link> - </span> - </div> -</template> diff --git a/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue b/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue index 63de1e009fd..caf13bc898b 100644 --- a/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue +++ b/app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue @@ -82,7 +82,7 @@ export default { v-gl-tooltip name="eye-slash" :title="__('Confidential')" - class="confidential-icon append-right-4 align-self-baseline align-self-md-auto mt-xl-0" + class="confidential-icon gl-mr-2 align-self-baseline align-self-md-auto mt-xl-0" :aria-label="__('Confidential')" /> <a :href="computedPath" class="sortable-link gl-font-weight-normal">{{ title }}</a> |