MS-475: My KV Instrumente/Grundlagenwissenseite

This commit is contained in:
Daniel Egger 2022-05-10 16:23:10 +02:00
parent 77c355d569
commit c0b6ff6fa6
11 changed files with 59 additions and 31 deletions

View File

@ -7,8 +7,6 @@ module.exports = {
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_FOOTER: "false",
VUE_APP_SHOW_OBJECTIVES_TITLE: "false",
/*
* Vars used in HTML templates don't need to be stringyfied, as HTML does not need them to have quotes

View File

@ -16,8 +16,6 @@ const values = {
VUE_APP_LOGO: '"/static/logo.png"',
VUE_APP_ENABLE_PORTFOLIO: "true",
VUE_APP_ENABLE_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
VUE_APP_ENABLE_FOOTER: "true",
VUE_APP_SHOW_OBJECTIVES_TITLE: "true",
/*
* Vars used in HTML templates don't need to be stringyfied, as HTML does not need them to have quotes

View File

@ -13,8 +13,9 @@
</template>
<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 appFlavorTermsMixin from '@/mixins/app-flavor-terms';
export default {
props: {
@ -25,6 +26,8 @@
},
},
mixins: [appFlavorTermsMixin],
computed: {
typeClass() {
return {
@ -34,7 +37,11 @@
};
},
categoryName() {
return instrumentType(this.instrument);
if (process.env.VUE_APP_FLAVOR === 'my-kv') {
return this.flavorTextInstrumente;
} else {
return instrumentType(this.instrument);
}
},
},
};

View File

@ -40,7 +40,7 @@
</div>
<h3 id="objectives">
<span v-show="showObjectivesTitle">Lernziele</span>
<span v-show="flavorShowObjectivesTitle">Lernziele</span>
</h3>
<div class="module__objective-groups">
@ -65,6 +65,7 @@
import ObjectiveGroups from '@/components/objective-groups/ObjectiveGroups.vue';
import Chapter from '@/components/Chapter.vue';
import BookmarkActions from '@/components/notes/BookmarkActions';
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
export default {
@ -74,6 +75,7 @@
default: () => ({}),
},
},
mixins: [appFlavorFlagsMixin],
components: {
BookmarkActions,
ObjectiveGroups,
@ -99,9 +101,6 @@
}
return this.module.bookmark.note;
},
showObjectivesTitle() {
return process.env.VUE_APP_SHOW_OBJECTIVES_TITLE;
}
},
};
</script>

View File

@ -1,3 +0,0 @@
const enableFooter = () => process.env.VUE_APP_ENABLE_FOOTER;
export default enableFooter;

View File

@ -1,13 +1,13 @@
import {LANGUAGE_COMMUNICATION, SOCIETY} from '@/consts/instrument.consts';
import { LANGUAGE_COMMUNICATION, SOCIETY } from '@/consts/instrument.consts';
const instrumentType = ({type: {category}}) => {
if (category === LANGUAGE_COMMUNICATION) {
return 'Sprache & Kommunikation';
} else if (category === SOCIETY) {
return 'Gesellschaft';
} else {
return 'Überfachliches Instrument';
}
if (category === LANGUAGE_COMMUNICATION) {
return 'Sprache & Kommunikation';
} else if (category === SOCIETY) {
return 'Gesellschaft';
} else {
return 'Überfachliches Instrument';
}
};
export default instrumentType;

View File

@ -26,9 +26,10 @@
import ProfileSidebar from '@/components/profile/ProfileSidebar';
import DefaultFooter from '@/layouts/DefaultFooter';
import NavigationSidebar from '@/components/book-navigation/NavigationSidebar';
import enableFooter from '@/helpers/footer';
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
export default {
mixins: [appFlavorFlagsMixin],
components: {
HeaderBar,
ProfileSidebar,
@ -56,7 +57,7 @@
return classes;
},
enableFooter() {
return enableFooter() && (!this.$route.meta || !this.$route.meta.hideFooter);
return this.flavorShowFooter && (!this.$route.meta || !this.$route.meta.hideFooter);
}
}
};

View File

@ -11,24 +11,22 @@
<router-view class="public__content layout__content" />
<default-footer
class="skillbox__footer public__footer footer"
v-if="enableFooter"
v-if="flavorShowFooter"
/>
</div>
</template>
<script>
import DefaultFooter from '@/layouts/DefaultFooter';
import enableFooter from '@/helpers/footer';
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
const Logo = () => import(/* webpackChunkName: "icons" */'@/components/icons/Logo');
export default {
mixins: [appFlavorFlagsMixin],
components: {
Logo,
DefaultFooter
},
computed: {
enableFooter: enableFooter
}
};
</script>

View File

@ -19,10 +19,12 @@
<script>
import SimpleFooter from '@/layouts/SimpleFooter';
import enableFooter from '@/helpers/footer';
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
const Cross = () => import(/* webpackChunkName: "icons" */'@/components/icons/CrossIcon');
export default {
mixins: [appFlavorFlagsMixin],
components: {
Cross,
SimpleFooter
@ -33,7 +35,7 @@
if (this.$route.meta.hideFooter) {
return false;
}
return enableFooter();
return this.flavorShowFooter;
}
},

View File

@ -0,0 +1,24 @@
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;
}
}
};

View File

@ -2,8 +2,10 @@
<div class="instrument-overview">
<instrument-filter
class="instrument-overview__filter"
v-if="flavorShowInstrumentFilterSidebar"
@filter="updateFilter"
/>
<div class="instrument-overview__filter" v-else />
<div class="instrument-overview__list">
<router-link
:to="{name: 'instrument', params: {slug: instrument.slug}}"
@ -23,8 +25,10 @@
import InstrumentEntry from '@/components/instruments/InstrumentEntry';
import INSTRUMENTS_QUERY from '@/graphql/gql/queries/instrumentsQuery.gql';
import INSTRUMENT_FILTER_QUERY from 'gql/local/instrumentFilter.gql';
import appFlavorFlagsMixin from '@/mixins/app-flavor-flags';
export default {
mixins: [appFlavorFlagsMixin],
components: {
InstrumentFilter,
InstrumentEntry,