Refactor from flavor mixin to ES6 module and plugin
This commit is contained in:
parent
c0b6ff6fa6
commit
d7eaced895
|
|
@ -4,8 +4,6 @@ module.exports = {
|
||||||
* ENV variables used in JS code need to be stringyfied, as they will be replaced in the code, and JS needs quotes
|
* ENV variables used in JS code need to be stringyfied, as they will be replaced in the code, and JS needs quotes
|
||||||
* around strings
|
* around strings
|
||||||
*/
|
*/
|
||||||
VUE_APP_LOGO: '"https://skillbox-my-kv-prod.s3-eu-west-1.amazonaws.com/mykv-logo.png"',
|
|
||||||
VUE_APP_ENABLE_PORTFOLIO: "true",
|
|
||||||
VUE_APP_ENABLE_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
|
VUE_APP_ENABLE_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@ const values = {
|
||||||
* and JS needs quotes around strings
|
* and JS needs quotes around strings
|
||||||
* see https://cli.vuejs.org/guide/mode-and-env.html#using-env-variables-in-client-side-code
|
* see https://cli.vuejs.org/guide/mode-and-env.html#using-env-variables-in-client-side-code
|
||||||
*/
|
*/
|
||||||
VUE_APP_LOGO: '"/static/logo.png"',
|
|
||||||
VUE_APP_ENABLE_PORTFOLIO: "true",
|
|
||||||
VUE_APP_ENABLE_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
|
VUE_APP_ENABLE_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<a
|
<a
|
||||||
class="button button--primary submissions-page__back"
|
class="button button--primary submissions-page__back"
|
||||||
@click="$emit('back')"
|
@click="$emit('back')"
|
||||||
>Aufgabe im {{ flavorTextModul }} anzeigen</a>
|
>Aufgabe im {{ $flavor.textModule }} anzeigen</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
@ -64,13 +64,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import StudentSubmission from '@/components/StudentSubmission';
|
import StudentSubmission from '@/components/StudentSubmission';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
import { meQuery } from '@/graphql/queries';
|
import { meQuery } from '@/graphql/queries';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['assignment'],
|
props: ['assignment'],
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
StudentSubmission
|
StudentSubmission
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@
|
||||||
import { ROOMS_PAGE } from '@/router/room.names';
|
import { ROOMS_PAGE } from '@/router/room.names';
|
||||||
import { PROJECTS_PAGE } from '@/router/portfolio.names';
|
import { PROJECTS_PAGE } from '@/router/portfolio.names';
|
||||||
|
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
const ChevronLeft = () => import(/* webpackChunkName: "icons" */'@/components/icons/ChevronLeft');
|
const ChevronLeft = () => import(/* webpackChunkName: "icons" */'@/components/icons/ChevronLeft');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -33,8 +31,6 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
ChevronLeft,
|
ChevronLeft,
|
||||||
},
|
},
|
||||||
|
|
@ -55,9 +51,9 @@
|
||||||
fullTitle() {
|
fullTitle() {
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case 'topic':
|
case 'topic':
|
||||||
return `${this.flavorTextThema}: ${this.title}`;
|
return `${this.$flavor.textTopic}: ${this.title}`;
|
||||||
case 'module':
|
case 'module':
|
||||||
return `${this.flavorTextModul}: ${this.title}`;
|
return `${this.$flavor.textModule}: ${this.title}`;
|
||||||
default:
|
default:
|
||||||
return this.title;
|
return this.title;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@
|
||||||
import DELETE_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/deleteContentBlock.gql';
|
import DELETE_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/deleteContentBlock.gql';
|
||||||
|
|
||||||
import me from '@/mixins/me';
|
import me from '@/mixins/me';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
import { hidden } from '@/helpers/visibility';
|
import { hidden } from '@/helpers/visibility';
|
||||||
import { CONTENT_TYPE } from '@/consts/types';
|
import { CONTENT_TYPE } from '@/consts/types';
|
||||||
|
|
@ -115,7 +114,7 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [me, appFlavorTermsMixin],
|
mixins: [me],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
PopoverLink,
|
PopoverLink,
|
||||||
|
|
@ -139,7 +138,7 @@
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${this.flavorTextInstrument} - ${instruments[contentType]}`;
|
return `${this.$flavor.textInstrument} - ${instruments[contentType]}`;
|
||||||
},
|
},
|
||||||
canEditContentBlock() {
|
canEditContentBlock() {
|
||||||
return this.contentBlock.mine && !this.contentBlock.indent;
|
return this.contentBlock.mine && !this.contentBlock.indent;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
class="content-navigation__link"
|
class="content-navigation__link"
|
||||||
@click.native="close"
|
@click.native="close"
|
||||||
>
|
>
|
||||||
{{ flavorTextThemen }}
|
{{ $flavor.textTopics }}
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<book-topic-navigation
|
<book-topic-navigation
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
class="content-navigation__link"
|
class="content-navigation__link"
|
||||||
@click.native="close"
|
@click.native="close"
|
||||||
>
|
>
|
||||||
{{ flavorTextInstrumente }}
|
{{ $flavor.textInstruments }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -99,7 +99,6 @@
|
||||||
<script>
|
<script>
|
||||||
import BookTopicNavigation from '@/components/book-navigation/BookTopicNavigation';
|
import BookTopicNavigation from '@/components/book-navigation/BookTopicNavigation';
|
||||||
|
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
import sidebarMixin from '@/mixins/sidebar';
|
import sidebarMixin from '@/mixins/sidebar';
|
||||||
import meMixin from '@/mixins/me';
|
import meMixin from '@/mixins/me';
|
||||||
|
|
||||||
|
|
@ -112,7 +111,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [sidebarMixin, meMixin, appFlavorTermsMixin],
|
mixins: [sidebarMixin, meMixin],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
BookTopicNavigation,
|
BookTopicNavigation,
|
||||||
|
|
@ -121,7 +120,7 @@
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
showPortfolio() {
|
showPortfolio() {
|
||||||
return process.env.VUE_APP_ENABLE_PORTFOLIO;
|
return this.$flavor.showPortfolio;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,17 +9,14 @@
|
||||||
:to="{name: 'instrument', params: { slug: value.slug }}"
|
:to="{name: 'instrument', params: { slug: value.slug }}"
|
||||||
class="instrument-widget__button button"
|
class="instrument-widget__button button"
|
||||||
>
|
>
|
||||||
{{ flavorTextInstrument }} anzeigen
|
{{ $flavor.textInstrument }} anzeigen
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['value'],
|
props: ['value'],
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
img() {
|
img() {
|
||||||
return process.env.VUE_APP_LOGO;
|
return this.$flavor.appLogo;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { INTERDISCIPLINARY, LANGUAGE_COMMUNICATION, SOCIETY } from '@/consts/instrument.consts';
|
import { INTERDISCIPLINARY, LANGUAGE_COMMUNICATION, SOCIETY } from '@/consts/instrument.consts';
|
||||||
import instrumentType from '@/helpers/instrumentType';
|
import instrumentType from '@/helpers/instrumentType';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -26,8 +25,6 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
typeClass() {
|
typeClass() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -37,8 +34,8 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
categoryName() {
|
categoryName() {
|
||||||
if (process.env.VUE_APP_FLAVOR === 'my-kv') {
|
if (this.$flavor.appFlavor === 'my-kv') {
|
||||||
return this.flavorTextInstrumente;
|
return this.$flavor.textInstruments;
|
||||||
} else {
|
} else {
|
||||||
return instrumentType(this.instrument);
|
return instrumentType(this.instrument);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 id="objectives">
|
<h3 id="objectives">
|
||||||
<span v-show="flavorShowObjectivesTitle">Lernziele</span>
|
<span v-show="$flavor.showObjectivesTitle">Lernziele</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="module__objective-groups">
|
<div class="module__objective-groups">
|
||||||
|
|
@ -65,7 +65,6 @@
|
||||||
import ObjectiveGroups from '@/components/objective-groups/ObjectiveGroups.vue';
|
import ObjectiveGroups from '@/components/objective-groups/ObjectiveGroups.vue';
|
||||||
import Chapter from '@/components/Chapter.vue';
|
import Chapter from '@/components/Chapter.vue';
|
||||||
import BookmarkActions from '@/components/notes/BookmarkActions';
|
import BookmarkActions from '@/components/notes/BookmarkActions';
|
||||||
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
|
|
@ -75,7 +74,7 @@
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mixins: [appFlavorFlagsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
BookmarkActions,
|
BookmarkActions,
|
||||||
ObjectiveGroups,
|
ObjectiveGroups,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<a
|
<a
|
||||||
class="button"
|
class="button"
|
||||||
@click="close"
|
@click="close"
|
||||||
>Zurück zum {{ flavorTextModul }}</a>
|
>Zurück zum {{ $flavor.textModule }}</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</modal>
|
</modal>
|
||||||
|
|
@ -35,10 +35,8 @@
|
||||||
import Modal from '@/components/Modal';
|
import Modal from '@/components/Modal';
|
||||||
import { SNAPSHOT_LIST } from '@/router/module.names';
|
import { SNAPSHOT_LIST } from '@/router/module.names';
|
||||||
import dateformat from '@/helpers/date-format';
|
import dateformat from '@/helpers/date-format';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
Modal,
|
Modal,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
<checkbox
|
<checkbox
|
||||||
:checked="agreement"
|
:checked="agreement"
|
||||||
data-cy="apply-checkbox"
|
data-cy="apply-checkbox"
|
||||||
:label="`Ich will die Anpassungen aus diesem Snapshot in das ${flavorTextModul} kopieren.`"
|
:label="`Ich will die Anpassungen aus diesem Snapshot in das ${$flavor.textModule} kopieren.`"
|
||||||
@input="agreement = $event"
|
@input="agreement = $event"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -68,7 +68,6 @@
|
||||||
import Checkbox from '@/components/ui/Checkbox';
|
import Checkbox from '@/components/ui/Checkbox';
|
||||||
|
|
||||||
import me from '@/mixins/me';
|
import me from '@/mixins/me';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
import APPLY_SNAPSHOT_MUTATION from 'gql/mutations/snapshots/applySnapshot.gql';
|
import APPLY_SNAPSHOT_MUTATION from 'gql/mutations/snapshots/applySnapshot.gql';
|
||||||
import { MODULE_PAGE } from '@/router/module.names';
|
import { MODULE_PAGE } from '@/router/module.names';
|
||||||
|
|
@ -89,7 +88,7 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [me, appFlavorTermsMixin],
|
mixins: [me],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Checkbox,
|
Checkbox,
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
<template v-else>
|
<template v-else>
|
||||||
Diese Person kann
|
Diese Person kann
|
||||||
</template>
|
</template>
|
||||||
weiterhin {{ flavorTextModule }} und {{ flavorTextInstrumente }} lesen.
|
weiterhin {{ $flavor.textModules }} und {{ $flavor.textInstruments }} lesen.
|
||||||
</li>
|
</li>
|
||||||
<li class="deactivate-user__text deactivate-user__list-item">
|
<li class="deactivate-user__text deactivate-user__list-item">
|
||||||
<template v-if="myself">
|
<template v-if="myself">
|
||||||
|
|
@ -75,11 +75,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Modal from '@/components/Modal';
|
import Modal from '@/components/Modal';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Modal
|
Modal
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<toggle
|
<toggle
|
||||||
:checked="module.inEditMode"
|
:checked="module.inEditMode"
|
||||||
data-cy="toggle-editing"
|
data-cy="toggle-editing"
|
||||||
:label="`${flavorTextModul} anpassen`"
|
:label="`${$flavor.textModule} anpassen`"
|
||||||
@input="toggle"
|
@input="toggle"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -13,8 +13,6 @@
|
||||||
import { gql } from '@apollo/client/core';
|
import { gql } from '@apollo/client/core';
|
||||||
import { setModuleEditMode } from '@/graphql/cache-operations';
|
import { setModuleEditMode } from '@/graphql/cache-operations';
|
||||||
|
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
const QUERY = gql`
|
const QUERY = gql`
|
||||||
query ModuleEditModeQuery ($slug: String) {
|
query ModuleEditModeQuery ($slug: String) {
|
||||||
module(slug: $slug) {
|
module(slug: $slug) {
|
||||||
|
|
@ -25,8 +23,6 @@
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Toggle
|
Toggle
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
const defaultFlavorValues = {
|
||||||
|
appFlavor: 'skillbox',
|
||||||
|
appLogo: '/static/logo.png',
|
||||||
|
|
||||||
|
// mySkillbox texts
|
||||||
|
textAppName: 'mySkillbox',
|
||||||
|
textTopic: 'Thema',
|
||||||
|
textTopics: 'Themen',
|
||||||
|
textModule: 'Modul',
|
||||||
|
textModules: 'Module',
|
||||||
|
textInstrument: 'Instrument',
|
||||||
|
textInstruments: 'Instrumente',
|
||||||
|
|
||||||
|
// mySkillbox flags
|
||||||
|
showFooter: true,
|
||||||
|
showObjectivesTitle: true,
|
||||||
|
showInstrumentFilterSidebar: true,
|
||||||
|
showPortfolio: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
let flavorValues = Object.assign({}, defaultFlavorValues);
|
||||||
|
|
||||||
|
if (process.env.VUE_APP_FLAVOR === 'my-kv') {
|
||||||
|
flavorValues = Object.assign({}, defaultFlavorValues, {
|
||||||
|
appFlavor: 'my-kv',
|
||||||
|
appLogo: 'https://skillbox-my-kv-prod.s3-eu-west-1.amazonaws.com/mykv-logo.png',
|
||||||
|
|
||||||
|
// myKV texts
|
||||||
|
textAppName: 'myKV',
|
||||||
|
textTopic: 'HKB',
|
||||||
|
textTopics: 'HKB',
|
||||||
|
textModule: 'Lernfeld',
|
||||||
|
textModules: 'Lernfelder',
|
||||||
|
textInstrument: 'Grundlagenwissen',
|
||||||
|
textInstruments: 'Grundlagenwissen',
|
||||||
|
|
||||||
|
// myKV flags
|
||||||
|
showFooter: false,
|
||||||
|
showObjectivesTitle: false,
|
||||||
|
showInstrumentFilterSidebar: false,
|
||||||
|
showPortfolio: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export default flavorValues;
|
||||||
|
|
@ -26,10 +26,8 @@
|
||||||
import ProfileSidebar from '@/components/profile/ProfileSidebar';
|
import ProfileSidebar from '@/components/profile/ProfileSidebar';
|
||||||
import DefaultFooter from '@/layouts/DefaultFooter';
|
import DefaultFooter from '@/layouts/DefaultFooter';
|
||||||
import NavigationSidebar from '@/components/book-navigation/NavigationSidebar';
|
import NavigationSidebar from '@/components/book-navigation/NavigationSidebar';
|
||||||
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorFlagsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
HeaderBar,
|
HeaderBar,
|
||||||
ProfileSidebar,
|
ProfileSidebar,
|
||||||
|
|
@ -57,7 +55,7 @@
|
||||||
return classes;
|
return classes;
|
||||||
},
|
},
|
||||||
enableFooter() {
|
enableFooter() {
|
||||||
return this.flavorShowFooter && (!this.$route.meta || !this.$route.meta.hideFooter);
|
return this.$flavor.showFooter && (!this.$route.meta || !this.$route.meta.hideFooter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,16 @@
|
||||||
<router-view class="public__content layout__content" />
|
<router-view class="public__content layout__content" />
|
||||||
<default-footer
|
<default-footer
|
||||||
class="skillbox__footer public__footer footer"
|
class="skillbox__footer public__footer footer"
|
||||||
v-if="flavorShowFooter"
|
v-if="$flavor.showFooter"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import DefaultFooter from '@/layouts/DefaultFooter';
|
import DefaultFooter from '@/layouts/DefaultFooter';
|
||||||
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
|
|
||||||
|
|
||||||
const Logo = () => import(/* webpackChunkName: "icons" */'@/components/icons/Logo');
|
const Logo = () => import(/* webpackChunkName: "icons" */'@/components/icons/Logo');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorFlagsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
Logo,
|
Logo,
|
||||||
DefaultFooter
|
DefaultFooter
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SimpleFooter from '@/layouts/SimpleFooter';
|
import SimpleFooter from '@/layouts/SimpleFooter';
|
||||||
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
|
|
||||||
|
|
||||||
const Cross = () => import(/* webpackChunkName: "icons" */'@/components/icons/CrossIcon');
|
const Cross = () => import(/* webpackChunkName: "icons" */'@/components/icons/CrossIcon');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorFlagsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
Cross,
|
Cross,
|
||||||
SimpleFooter
|
SimpleFooter
|
||||||
|
|
@ -35,7 +33,7 @@
|
||||||
if (this.$route.meta.hideFooter) {
|
if (this.$route.meta.hideFooter) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return this.flavorShowFooter;
|
return this.$flavor.showFooter;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import VueVimeoPlayer from 'vue-vimeo-player';
|
||||||
import apolloClientFactory from './graphql/client';
|
import apolloClientFactory from './graphql/client';
|
||||||
import VueApollo from 'vue-apollo';
|
import VueApollo from 'vue-apollo';
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
import {postLoginRedirectUrlKey, router} from './router';
|
import { postLoginRedirectUrlKey, router } from './router';
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
import VueScrollTo from 'vue-scrollto';
|
import VueScrollTo from 'vue-scrollto';
|
||||||
import autoGrow from '@/directives/auto-grow';
|
import autoGrow from '@/directives/auto-grow';
|
||||||
|
|
@ -15,7 +15,8 @@ import VueRemoveEdges from '@/plugins/edges';
|
||||||
import VueMatomo from 'vue-matomo';
|
import VueMatomo from 'vue-matomo';
|
||||||
import VueToast from 'vue-toast-notification';
|
import VueToast from 'vue-toast-notification';
|
||||||
import VueLogger from 'vuejs-logger';
|
import VueLogger from 'vuejs-logger';
|
||||||
import {joiningClass, loginRequired, unauthorizedAccess} from "@/router/guards";
|
import { joiningClass, loginRequired, unauthorizedAccess } from '@/router/guards';
|
||||||
|
import flavorPlugin from '@/plugins/flavor';
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
const isProduction = process.env.NODE_ENV === 'production';
|
const isProduction = process.env.NODE_ENV === 'production';
|
||||||
|
|
@ -38,6 +39,8 @@ Vue.use(VueScrollTo, {
|
||||||
offset: -50,
|
offset: -50,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Vue.use(flavorPlugin);
|
||||||
|
|
||||||
if (process.env.MATOMO_HOST) {
|
if (process.env.MATOMO_HOST) {
|
||||||
Vue.use(VueMatomo, {
|
Vue.use(VueMatomo, {
|
||||||
host: process.env.MATOMO_HOST,
|
host: process.env.MATOMO_HOST,
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
export default {
|
|
||||||
computed: {
|
|
||||||
flavorShowObjectivesTitle() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv': return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
flavorShowFooter() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
flavorShowInstrumentFilterSidebar() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
export default {
|
|
||||||
computed: {
|
|
||||||
flavorPageTitle() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv': return 'My KV';
|
|
||||||
}
|
|
||||||
return 'my Skillbox';
|
|
||||||
},
|
|
||||||
flavorTextModul() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return 'Lernfeld';
|
|
||||||
}
|
|
||||||
return 'Modul';
|
|
||||||
},
|
|
||||||
flavorTextModule() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return 'Lernfelder';
|
|
||||||
}
|
|
||||||
return 'Module';
|
|
||||||
},
|
|
||||||
flavorTextThema() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return 'HKB';
|
|
||||||
}
|
|
||||||
return 'Thema';
|
|
||||||
},
|
|
||||||
flavorTextThemen() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return 'HKB';
|
|
||||||
}
|
|
||||||
return 'Themen';
|
|
||||||
},
|
|
||||||
flavorTextInstrument() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return 'Grundlagenwissen';
|
|
||||||
}
|
|
||||||
return 'Instrument';
|
|
||||||
},
|
|
||||||
flavorTextInstrumente() {
|
|
||||||
switch(process.env.VUE_APP_FLAVOR) {
|
|
||||||
case 'my-kv':
|
|
||||||
return 'Grundlagenwissen';
|
|
||||||
}
|
|
||||||
return 'Instrumente';
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<p class="about__text">
|
<p class="about__text">
|
||||||
mySkillbox ist ein Angebot des hep Verlags in
|
{{ $flavor.textAppName }} ist ein Angebot des hep Verlags in
|
||||||
Zusammenarbeit mit der Eidgenössischen Hochschule für Berufsbildung (EHB).
|
Zusammenarbeit mit der Eidgenössischen Hochschule für Berufsbildung (EHB).
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
class="login-actions__title"
|
class="login-actions__title"
|
||||||
data-cy="hello-title"
|
data-cy="hello-title"
|
||||||
>
|
>
|
||||||
Wollen Sie {{ flavorPageTitle }} im Unterricht verwenden?
|
Wollen Sie {{ $flavor.textAppName }} im Unterricht verwenden?
|
||||||
</h2>
|
</h2>
|
||||||
<a
|
<a
|
||||||
class="button button--primary button--big actions__submit"
|
class="button button--primary button--big actions__submit"
|
||||||
|
|
@ -71,13 +71,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
const HepLogoNoClaim = () => import(/* webpackChunkName: "icons" */'@/components/icons/HepLogoNoClaim');
|
const HepLogoNoClaim = () => import(/* webpackChunkName: "icons" */'@/components/icons/HepLogoNoClaim');
|
||||||
const EhbLogo = () => import(/* webpackChunkName: "icons" */'@/components/icons/EhbLogo');
|
const EhbLogo = () => import(/* webpackChunkName: "icons" */'@/components/icons/EhbLogo');
|
||||||
const Logo = () => import(/* webpackChunkName: "icons" */'@/components/icons/Logo');
|
const Logo = () => import(/* webpackChunkName: "icons" */'@/components/icons/Logo');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
HepLogoNoClaim,
|
HepLogoNoClaim,
|
||||||
EhbLogo,
|
EhbLogo,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link to="/module">
|
<router-link to="/module">
|
||||||
{{ flavorTextModul }}
|
{{ $flavor.textModule }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -28,11 +28,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ALL_MODULES from '@/graphql/gql/queries/allModules.gql';
|
import ALL_MODULES from '@/graphql/gql/queries/allModules.gql';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modules: []
|
modules: []
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,13 @@
|
||||||
<div class="instrument-overview">
|
<div class="instrument-overview">
|
||||||
<instrument-filter
|
<instrument-filter
|
||||||
class="instrument-overview__filter"
|
class="instrument-overview__filter"
|
||||||
v-if="flavorShowInstrumentFilterSidebar"
|
v-if="$flavor.showInstrumentFilterSidebar"
|
||||||
@filter="updateFilter"
|
@filter="updateFilter"
|
||||||
/>
|
/>
|
||||||
<div class="instrument-overview__filter" v-else />
|
<div
|
||||||
|
class="instrument-overview__filter"
|
||||||
|
v-else
|
||||||
|
/>
|
||||||
<div class="instrument-overview__list">
|
<div class="instrument-overview__list">
|
||||||
<router-link
|
<router-link
|
||||||
:to="{name: 'instrument', params: {slug: instrument.slug}}"
|
:to="{name: 'instrument', params: {slug: instrument.slug}}"
|
||||||
|
|
@ -25,10 +28,8 @@
|
||||||
import InstrumentEntry from '@/components/instruments/InstrumentEntry';
|
import InstrumentEntry from '@/components/instruments/InstrumentEntry';
|
||||||
import INSTRUMENTS_QUERY from '@/graphql/gql/queries/instrumentsQuery.gql';
|
import INSTRUMENTS_QUERY from '@/graphql/gql/queries/instrumentsQuery.gql';
|
||||||
import INSTRUMENT_FILTER_QUERY from 'gql/local/instrumentFilter.gql';
|
import INSTRUMENT_FILTER_QUERY from 'gql/local/instrumentFilter.gql';
|
||||||
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorFlagsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
InstrumentFilter,
|
InstrumentFilter,
|
||||||
InstrumentEntry,
|
InstrumentEntry,
|
||||||
|
|
|
||||||
|
|
@ -72,12 +72,11 @@
|
||||||
|
|
||||||
import me from '@/mixins/me';
|
import me from '@/mixins/me';
|
||||||
import logout from '@/mixins/logout';
|
import logout from '@/mixins/logout';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
const ValidatedInput = () => import('@/components/validation/ValidatedInput');
|
const ValidatedInput = () => import('@/components/validation/ValidatedInput');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [me, logout, appFlavorTermsMixin],
|
mixins: [me, logout],
|
||||||
components: {
|
components: {
|
||||||
LoadingButton,
|
LoadingButton,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
Lösungen
|
Lösungen
|
||||||
</h2>
|
</h2>
|
||||||
<p class="module-settings__paragraph">
|
<p class="module-settings__paragraph">
|
||||||
Wollen Sie die Lösungen in diesem {{ flavorTextModul }} für die Lernenden der ausgewählten Klasse anzeigen?
|
Wollen Sie die Lösungen in diesem {{ $flavor.textModule }} für die Lernenden der ausgewählten Klasse anzeigen?
|
||||||
</p>
|
</p>
|
||||||
<toggle-solutions-for-module />
|
<toggle-solutions-for-module />
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -36,11 +36,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ToggleSolutionsForModule from '@/components/toggle-menu/ToggleSolutionsForModule';
|
import ToggleSolutionsForModule from '@/components/toggle-menu/ToggleSolutionsForModule';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
ToggleSolutionsForModule,
|
ToggleSolutionsForModule,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
const Logo = () => import(/* webpackChunkName: "icons" */'@/components/icons/Logo');
|
const Logo = () => import(/* webpackChunkName: "icons" */'@/components/icons/Logo');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
Logo
|
Logo
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,16 @@
|
||||||
Ihr Lernbereich
|
Ihr Lernbereich
|
||||||
</h1>
|
</h1>
|
||||||
<h2 class="onboarding__heading">
|
<h2 class="onboarding__heading">
|
||||||
{{ flavorTextThemen }}
|
{{ $flavor.textTopics }}
|
||||||
</h2>
|
</h2>
|
||||||
<p class="onboarding__paragraph">
|
<p class="onboarding__paragraph">
|
||||||
In den «{{ flavorTextThemen }}» finden Sie aktuelle {{ flavorTextModule }} mit Aufträgen und Situationen.
|
In den «{{ $flavor.textTopics }}» finden Sie aktuelle {{ $flavor.textModules }} mit Aufträgen und Situationen.
|
||||||
</p>
|
</p>
|
||||||
<h2 class="onboarding__heading">
|
<h2 class="onboarding__heading">
|
||||||
{{ flavorTextInstrumente }}
|
{{ $flavor.textInstruments }}
|
||||||
</h2>
|
</h2>
|
||||||
<p class="onboarding__paragraph">
|
<p class="onboarding__paragraph">
|
||||||
Die «{{ flavorTextInstrumente }}» helfen Ihnen dabei, Aufträge und Situationen zu bearbeiten. Zudem erweitern Sie so Ihre Kompetenzen.
|
Die «{{ $flavor.textInstruments }}» helfen Ihnen dabei, Aufträge und Situationen zu bearbeiten. Zudem erweitern Sie so Ihre Kompetenzen.
|
||||||
</p>
|
</p>
|
||||||
<h2 class="onboarding__heading">
|
<h2 class="onboarding__heading">
|
||||||
News
|
News
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="snapshots">
|
<div class="snapshots">
|
||||||
<h1>Snapshots</h1>
|
<h1>Snapshots</h1>
|
||||||
<p class="snapshots__details">
|
<p class="snapshots__details">
|
||||||
{{ flavorTextThema }}: {{ module.topic.title }} - {{ module.metaTitle }}: {{ module.title }}
|
{{ $flavor.textTopic }}: {{ module.topic.title }} - {{ module.metaTitle }}: {{ module.title }}
|
||||||
</p>
|
</p>
|
||||||
<snapshot-team-menu
|
<snapshot-team-menu
|
||||||
:selected="selectedLink"
|
:selected="selectedLink"
|
||||||
|
|
@ -26,12 +26,10 @@
|
||||||
import SnapshotListItem from '@/components/modules/SnapshotListItem';
|
import SnapshotListItem from '@/components/modules/SnapshotListItem';
|
||||||
import MODULE_SNAPSHOTS_QUERY from '@/graphql/gql/queries/moduleSnapshots.gql';
|
import MODULE_SNAPSHOTS_QUERY from '@/graphql/gql/queries/moduleSnapshots.gql';
|
||||||
import SnapshotTeamMenu from '@/components/modules/SnapshotTeamMenu';
|
import SnapshotTeamMenu from '@/components/modules/SnapshotTeamMenu';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
const defaultModule = {topic: {}, snapshots: []};
|
const defaultModule = {topic: {}, snapshots: []};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [appFlavorTermsMixin],
|
|
||||||
components: {
|
components: {
|
||||||
SnapshotTeamMenu,
|
SnapshotTeamMenu,
|
||||||
SnapshotListItem,
|
SnapshotListItem,
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@
|
||||||
class="start-page__heading"
|
class="start-page__heading"
|
||||||
data-cy="start-page-heading"
|
data-cy="start-page-heading"
|
||||||
>
|
>
|
||||||
Letzte {{ flavorTextModule }}
|
Letzte {{ $flavor.textModules }}
|
||||||
</h2>
|
</h2>
|
||||||
<h3
|
<h3
|
||||||
class="start-page__no-modules"
|
class="start-page__no-modules"
|
||||||
data-cy="no-modules-yet"
|
data-cy="no-modules-yet"
|
||||||
v-if="!me.recentModules.length"
|
v-if="!me.recentModules.length"
|
||||||
>
|
>
|
||||||
Sie haben sich noch kein {{ flavorTextModul }} angeschaut. Legen Sie jetzt los!
|
Sie haben sich noch kein {{ $flavor.textModule }} angeschaut. Legen Sie jetzt los!
|
||||||
</h3>
|
</h3>
|
||||||
<div class="start-page__modules-list">
|
<div class="start-page__modules-list">
|
||||||
<module-teaser
|
<module-teaser
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
tag="div"
|
tag="div"
|
||||||
class="button"
|
class="button"
|
||||||
>
|
>
|
||||||
Alle {{ flavorTextModule }} anzeigen
|
Alle {{ $flavor.textModules }} anzeigen
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
@ -85,11 +85,9 @@
|
||||||
import meQuery from '@/mixins/me';
|
import meQuery from '@/mixins/me';
|
||||||
import news from '@/mixins/news';
|
import news from '@/mixins/news';
|
||||||
|
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
mixins: [meQuery, news, appFlavorTermsMixin],
|
mixins: [meQuery, news],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
NewsTeaser,
|
NewsTeaser,
|
||||||
|
|
@ -105,7 +103,7 @@
|
||||||
},
|
},
|
||||||
moduleText() {
|
moduleText() {
|
||||||
if (this.me.lastModule && this.me.lastModule.slug) {
|
if (this.me.lastModule && this.me.lastModule.slug) {
|
||||||
return `Aktuelles ${this.flavorTextModul} anzeigen`;
|
return `Aktuelles ${this.$flavor.textModule} anzeigen`;
|
||||||
}
|
}
|
||||||
return 'Alle Inhalte anzeigen';
|
return 'Alle Inhalte anzeigen';
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
v-if="me.isTeacher && topic.instructions"
|
v-if="me.isTeacher && topic.instructions"
|
||||||
>
|
>
|
||||||
<bulb-icon class="topic__instruction-icon topic__link-icon" />
|
<bulb-icon class="topic__instruction-icon topic__link-icon" />
|
||||||
<span class="topic__link-description">Anweisungen zum {{ flavorTextThema }} anzeigen</span>
|
<span class="topic__link-description">Anweisungen zum {{ $flavor.textTopic }} anzeigen</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic__modules">
|
<div class="topic__modules">
|
||||||
|
|
@ -48,7 +48,6 @@
|
||||||
import ModuleTeaser from '@/components/modules/ModuleTeaser.vue';
|
import ModuleTeaser from '@/components/modules/ModuleTeaser.vue';
|
||||||
import TOPIC_QUERY from '@/graphql/gql/queries/topicQuery.gql';
|
import TOPIC_QUERY from '@/graphql/gql/queries/topicQuery.gql';
|
||||||
import me from '@/mixins/me';
|
import me from '@/mixins/me';
|
||||||
import appFlavorTermsMixin from '@/mixins/app-flavor-terms';
|
|
||||||
import BookTopicNavigation from '@/components/book-navigation/BookTopicNavigation';
|
import BookTopicNavigation from '@/components/book-navigation/BookTopicNavigation';
|
||||||
|
|
||||||
import UPDATE_LAST_TOPIC_MUTATION from '@/graphql/gql/mutations/updateLastTopic.gql';
|
import UPDATE_LAST_TOPIC_MUTATION from '@/graphql/gql/mutations/updateLastTopic.gql';
|
||||||
|
|
@ -59,7 +58,7 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
mixins: [me, appFlavorTermsMixin],
|
mixins: [me],
|
||||||
components: {
|
components: {
|
||||||
BookTopicNavigation,
|
BookTopicNavigation,
|
||||||
ModuleTeaser,
|
ModuleTeaser,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import flavorValues from '@/helpers/app-flavor';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
install: (Vue) => {
|
||||||
|
Vue.prototype.$flavor = Object.assign({}, flavorValues);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import {NEW_PROJECT_PAGE, PROJECTS_PAGE} from '@/router/portfolio.names';
|
import { NEW_PROJECT_PAGE, PROJECTS_PAGE } from '@/router/portfolio.names';
|
||||||
|
import flavorValues from '@/helpers/app-flavor';
|
||||||
|
|
||||||
const portfolio = () => import(/* webpackChunkName: "portfolio" */'@/pages/portfolio/portfolio');
|
const portfolio = () => import(/* webpackChunkName: "portfolio" */'@/pages/portfolio/portfolio');
|
||||||
const project = () => import(/* webpackChunkName: "portfolio" */'@/pages/portfolio/project');
|
const project = () => import(/* webpackChunkName: "portfolio" */'@/pages/portfolio/project');
|
||||||
const newProject = () => import(/* webpackChunkName: "portfolio" */'@/pages/portfolio/newProject');
|
const newProject = () => import(/* webpackChunkName: "portfolio" */'@/pages/portfolio/newProject');
|
||||||
|
|
@ -11,6 +13,6 @@ const portfolioRoutes = [
|
||||||
{path: '/edit-project/:slug', name: 'edit-project', component: editProject, props: true},
|
{path: '/edit-project/:slug', name: 'edit-project', component: editProject, props: true},
|
||||||
];
|
];
|
||||||
|
|
||||||
const routes = process.env.VUE_APP_ENABLE_PORTFOLIO ? portfolioRoutes : [];
|
const routes = flavorValues.showPortfolio ? portfolioRoutes : [];
|
||||||
|
|
||||||
export default routes;
|
export default routes;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue