diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-25 00:08:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-25 00:08:59 +0300 |
commit | 18ca66076fc70059f109a1f8eaaa76115db727a8 (patch) | |
tree | 68acd829d26b9da7b32702a1ff93fabe25292c92 /app/assets/javascripts/vue_shared | |
parent | dc900fdc5f4c353ff2e261fc64fbbb0d87af1735 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/issuable/list/components/issuable_item.vue | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/app/assets/javascripts/vue_shared/issuable/list/components/issuable_item.vue b/app/assets/javascripts/vue_shared/issuable/list/components/issuable_item.vue index 31dd49ca415..0c1ad861889 100644 --- a/app/assets/javascripts/vue_shared/issuable/list/components/issuable_item.vue +++ b/app/assets/javascripts/vue_shared/issuable/list/components/issuable_item.vue @@ -8,6 +8,7 @@ import { isExternal, setUrlFragment } from '~/lib/utils/url_utility'; import { __, n__, sprintf } from '~/locale'; import IssuableAssignees from '~/issuable/components/issue_assignees.vue'; import timeagoMixin from '~/vue_shared/mixins/timeago'; +import SafeHtml from '~/vue_shared/directives/safe_html'; import WorkItemTypeIcon from '~/work_items/components/work_item_type_icon.vue'; import { STATE_CLOSED } from '~/work_items/constants'; import { isAssigneesWidget, isLabelsWidget } from '~/work_items/utils'; @@ -24,6 +25,7 @@ export default { }, directives: { GlTooltip: GlTooltipDirective, + SafeHtml, }, mixins: [timeagoMixin], props: { @@ -86,6 +88,9 @@ export default { authorId() { return getIdFromGraphQLId(this.author.id); }, + isIssueTrackerExternal() { + return Boolean(this.issuable.externalTracker); + }, isIssuableUrlExternal() { return isExternal(this.webUrl); }, @@ -259,18 +264,33 @@ export default { :title="__('This issue is hidden because its author has been banned')" :aria-label="__('Hidden')" /> - <gl-link - class="issue-title-text" - dir="auto" - :href="webUrl" - data-qa-selector="issuable_title_link" - data-testid="issuable-title-link" - v-bind="issuableTitleProps" - @click="handleIssuableItemClick" - > - {{ issuable.title }} + <template v-if="isIssueTrackerExternal"> + <gl-link + class="issue-title-text" + dir="auto" + :href="webUrl" + data-qa-selector="issuable_title_link" + data-testid="issuable-title-link" + v-bind="issuableTitleProps" + @click="handleIssuableItemClick" + > + {{ issuable.title }} + <gl-icon v-if="isIssuableUrlExternal" name="external-link" class="gl-ml-2" /> + </gl-link> + </template> + <template v-else> + <gl-link + v-safe-html="issuable.titleHtml || issuable.title" + class="issue-title-text" + dir="auto" + :href="webUrl" + data-qa-selector="issuable_title_link" + data-testid="issuable-title-link" + v-bind="issuableTitleProps" + @click="handleIssuableItemClick" + /> <gl-icon v-if="isIssuableUrlExternal" name="external-link" class="gl-ml-2" /> - </gl-link> + </template> <span v-if="taskStatus" class="task-status gl-display-none gl-sm-display-inline-block! gl-ml-2 gl-font-sm" |