chore: Remove static URLs from the documentation (#5461)
This commit is contained in:
@@ -243,7 +243,7 @@ export default {
|
||||
this.$emit('add-locale', this.portal.id);
|
||||
},
|
||||
openSite() {
|
||||
this.$emit('open-site');
|
||||
this.$emit('open-site', this.portal.slug);
|
||||
},
|
||||
openSettings() {
|
||||
this.fetchPortalsAndItsCategories();
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
:error="slugError"
|
||||
:label="$t('HELP_CENTER.PORTAL.ADD.SLUG.LABEL')"
|
||||
:placeholder="$t('HELP_CENTER.PORTAL.ADD.SLUG.PLACEHOLDER')"
|
||||
:help-text="$t('HELP_CENTER.PORTAL.ADD.SLUG.HELP_TEXT')"
|
||||
:help-text="domainHelpText"
|
||||
@input="$v.slug.$touch"
|
||||
/>
|
||||
</div>
|
||||
@@ -80,6 +80,7 @@
|
||||
import thumbnail from 'dashboard/components/widgets/Thumbnail';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { convertToCategorySlug } from 'dashboard/helper/commons.js';
|
||||
import { buildPortalURL } from 'dashboard/helper/portalHelper';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -132,6 +133,9 @@ export default {
|
||||
domainError() {
|
||||
return this.$v.domain.$error;
|
||||
},
|
||||
domainHelpText() {
|
||||
return buildPortalURL(this.slug);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const portal = this.portal || {};
|
||||
|
||||
@@ -51,6 +51,7 @@ import Spinner from 'shared/components/Spinner';
|
||||
import portalMixin from '../../mixins/portalMixin';
|
||||
import alertMixin from 'shared/mixins/alertMixin';
|
||||
import wootConstants from 'dashboard/constants';
|
||||
import { buildPortalArticleURL } from 'dashboard/helper/portalHelper';
|
||||
|
||||
const { ARTICLE_STATUS_TYPES } = wootConstants;
|
||||
export default {
|
||||
@@ -86,7 +87,11 @@ export default {
|
||||
},
|
||||
portalLink() {
|
||||
const slug = this.$route.params.portalSlug;
|
||||
return `/hc/${slug}/${this.article.category.slug}/${this.article.id}`;
|
||||
return buildPortalArticleURL(
|
||||
slug,
|
||||
this.article.category.slug,
|
||||
this.article.id
|
||||
);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="container overflow-auto">
|
||||
<article-header
|
||||
:header-title="headerTitle"
|
||||
:count="articleCount"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
:portal="portal"
|
||||
:status="portalStatus"
|
||||
@add-locale="addLocale"
|
||||
@open-site="openPortal"
|
||||
/>
|
||||
<div v-if="isFetching" class="portals--loader">
|
||||
<spinner />
|
||||
@@ -51,6 +52,8 @@ import PortalListItem from '../../components/PortalListItem';
|
||||
import Spinner from 'shared/components/Spinner.vue';
|
||||
import EmptyState from 'dashboard/components/widgets/EmptyState';
|
||||
import AddLocale from '../../components/AddLocale';
|
||||
import { buildPortalURL } from 'dashboard/helper/portalHelper';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
PortalListItem,
|
||||
@@ -79,6 +82,9 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
openPortal(portalSlug) {
|
||||
window.open(buildPortalURL(portalSlug), '_blank');
|
||||
},
|
||||
addPortal() {
|
||||
this.$router.push({ name: 'new_portal_information' });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user