Commit a65f9ffb authored by Tom Quirk's avatar Tom Quirk

Use gitlabWebUrl for issuable item

parent 4a1898a6
......@@ -47,17 +47,20 @@ export default {
author() {
return this.issuable.author;
},
webUrl() {
return this.issuable.gitlabWebUrl || this.issuable.webUrl;
},
authorId() {
return getIdFromGraphQLId(`${this.author.id}`);
},
isIssuableUrlExternal() {
// Check if URL is relative, which means it is internal.
if (!/^https?:\/\//g.test(this.issuable.webUrl)) {
if (!/^https?:\/\//g.test(this.webUrl)) {
return false;
}
// In case URL is absolute, it may or may not be internal,
// hence use `gon.gitlab_url` which is current instance domain.
return !this.issuable.webUrl.includes(gon.gitlab_url);
return !this.webUrl.includes(gon.gitlab_url);
},
labels() {
return this.issuable.labels?.nodes || this.issuable.labels || [];
......@@ -144,7 +147,7 @@ export default {
name="eye-slash"
:title="__('Confidential')"
/>
<gl-link :href="issuable.webUrl" v-bind="issuableTitleProps"
<gl-link :href="webUrl" v-bind="issuableTitleProps"
>{{ issuable.title
}}<gl-icon v-if="isIssuableUrlExternal" name="external-link" class="gl-ml-2"
/></gl-link>
......@@ -206,7 +209,7 @@ export default {
<gl-link
v-gl-tooltip:tooltipcontainer.top
:title="__('Comments')"
:href="`${issuable.webUrl}#notes`"
:href="`${webUrl}#notes`"
:class="{ 'no-comments': !issuable.userDiscussionsCount }"
class="gl-reset-color!"
>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment