From 77c355d56982b36181f374e88342b0fa1625f9c9 Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Tue, 10 May 2022 15:03:55 +0200 Subject: [PATCH] MS-474: Add myKV-specific terms --- client/config/prod-my-kv.env.js | 1 - client/config/prod.env.js | 7 ++- .../components/AssignmentWithSubmissions.vue | 6 ++- client/src/components/BackLink.vue | 14 +++-- client/src/components/ContentBlock.vue | 14 ++--- .../book-navigation/ContentNavigation.vue | 7 +-- .../content-blocks/InstrumentWidget.vue | 7 ++- .../components/modules/SnapshotCreated.vue | 6 ++- .../src/components/modules/SnapshotHeader.vue | 7 +-- .../components/profile/DeactivatePerson.vue | 5 +- .../components/toggle-menu/ToggleEditing.vue | 10 ++-- client/src/mixins/app-flavor-terms.js | 52 +++++++++++++++++++ client/src/mixins/page-title.js | 7 --- client/src/pages/hello.vue | 6 +-- client/src/pages/index.vue | 5 +- client/src/pages/license-activation.vue | 10 ++-- client/src/pages/module/moduleSettings.vue | 5 +- client/src/pages/onboarding/start.vue | 6 +-- client/src/pages/onboarding/step1.vue | 8 +-- client/src/pages/snapshot/snapshots.vue | 5 +- client/src/pages/start.vue | 17 +++--- client/src/pages/topic-page.vue | 6 ++- 22 files changed, 142 insertions(+), 69 deletions(-) create mode 100644 client/src/mixins/app-flavor-terms.js delete mode 100644 client/src/mixins/page-title.js diff --git a/client/config/prod-my-kv.env.js b/client/config/prod-my-kv.env.js index ad0831fc..b6e3d76f 100644 --- a/client/config/prod-my-kv.env.js +++ b/client/config/prod-my-kv.env.js @@ -7,7 +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_JS_TITLE: '"My KV"', VUE_APP_ENABLE_FOOTER: "false", VUE_APP_SHOW_OBJECTIVES_TITLE: "false", diff --git a/client/config/prod.env.js b/client/config/prod.env.js index 39d811c2..f70b3b7a 100644 --- a/client/config/prod.env.js +++ b/client/config/prod.env.js @@ -7,7 +7,7 @@ const values = { MATOMO_HOST: JSON.stringify(process.env.MATOMO_HOST), MATOMO_SITE_ID: JSON.stringify(process.env.MATOMO_SITE_ID), LOGOUT_REDIRECT_URL: JSON.stringify(process.env.LOGOUT_REDIRECT_URL), - VUE_APP_TYPE: JSON.stringify(process.env.APP_TYPE), + VUE_APP_FLAVOR: JSON.stringify(process.env.APP_FLAVOR), /* * ENV variables used in JS code need to be stringyfied, as they will be replaced (in place) in the code, * and JS needs quotes around strings @@ -16,7 +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_JS_TITLE: '"mySkillbox"', VUE_APP_ENABLE_FOOTER: "true", VUE_APP_SHOW_OBJECTIVES_TITLE: "true", @@ -30,10 +29,10 @@ const values = { // ^^^^ HTML PROPERTIES TO HERE, NOT STRINGIFIED ^^^^ } -if (process.env.APP_TYPE === 'my-kv') { +if (process.env.APP_FLAVOR === 'my-kv') { module.exports = merge(values, require('./prod-my-kv.env.js')); } else { - // we are on the skillbox APP_TYPE + // we are on the skillbox APP_FLAVOR module.exports = values; } diff --git a/client/src/components/AssignmentWithSubmissions.vue b/client/src/components/AssignmentWithSubmissions.vue index f27a9181..944e0867 100644 --- a/client/src/components/AssignmentWithSubmissions.vue +++ b/client/src/components/AssignmentWithSubmissions.vue @@ -9,7 +9,7 @@ Aufgabe im Modul anzeigen + >Aufgabe im {{ flavorTextModul }} anzeigen
import StudentSubmission from '@/components/StudentSubmission'; + import appFlavorTermsMixin from '@/mixins/app-flavor-terms'; - import {meQuery} from '@/graphql/queries'; + import { meQuery } from '@/graphql/queries'; export default { props: ['assignment'], + mixins: [appFlavorTermsMixin], components: { StudentSubmission diff --git a/client/src/components/BackLink.vue b/client/src/components/BackLink.vue index 377d2c35..0f490e79 100644 --- a/client/src/components/BackLink.vue +++ b/client/src/components/BackLink.vue @@ -9,9 +9,11 @@ diff --git a/client/src/components/modules/SnapshotCreated.vue b/client/src/components/modules/SnapshotCreated.vue index 687db00f..b63eb12f 100644 --- a/client/src/components/modules/SnapshotCreated.vue +++ b/client/src/components/modules/SnapshotCreated.vue @@ -25,7 +25,7 @@ Zurück zum Modul + >Zurück zum {{ flavorTextModul }}
@@ -33,10 +33,12 @@