diff --git a/.gitignore b/.gitignore index 361c1a3..d03476a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ node_modules /public/config.js # local env files +.env .env.local .env.*.local diff --git a/README.md b/README.md index 5ff2033..d6f9512 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,13 @@ cp public/config.js.dev public/config.js vi public/config.js ``` +### Umgebungsvariablen setzen + +``` +cp env.example .env +vi .env +``` + ### Compiles and hot-reloads for development ``` npm run serve diff --git a/env.example b/env.example new file mode 100644 index 0000000..af5390a --- /dev/null +++ b/env.example @@ -0,0 +1,6 @@ +VUE_APP_PASSWORD_RESET_URL="https://resetpw.wtf-eg.de/" +VUE_APP_IMPRINT_URL="https://wtf-eg.de/impressum/" +VUE_APP_ISSUE_URL="https://git.wtf-eg.de/kompetenzinventar/ki-doku/issues/new/choose" +VUE_APP_PRIVACY_URL="https://wtf-eg.de/datenschutz/" +VUE_APP_SOURCE_CODE_URL="https://git.wtf-eg.de/kompetenzinventar" +VUE_APP_TENANT="WTF" diff --git a/src/App.vue b/src/App.vue index 477a9e1..89904b9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,6 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later + + diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 59fc452..f52fce8 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -11,7 +11,10 @@ SPDX-License-Identifier: AGPL-3.0-or-later class="navbar-brand" :to="{ path:'/s/search' }" > - + Kompetenzinventar KI @@ -79,14 +82,20 @@ export default { name: 'Navbar', mixins: [RequestMixin], data() { + const tenant = process.env.VUE_APP_TENANT || "WTF" + return { - showMobileNav: false + showMobileNav: false, + tenant, } }, computed: { ...mapState(['currentUserId']) }, methods: { + loadImage(type) { + return require(`../assets/img/${this.tenant.toLowerCase()}_${type}.svg`) + }, toggleMobileNav() { this.showMobileNav = !this.showMobileNav }, @@ -100,8 +109,7 @@ export default { diff --git a/src/views/Search.vue b/src/views/Search.vue index c42015e..9defa02 100644 --- a/src/views/Search.vue +++ b/src/views/Search.vue @@ -6,9 +6,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later - + - Finde WTF Member + Finde {{tenant}} Member @@ -93,8 +93,11 @@ export default { Spinner, }, data() { + const tenant = process.env.VUE_APP_TENANT || "WTF" + return { - textChanged: false + tenant, + textChanged: false, } }, computed: { @@ -175,6 +178,7 @@ export default { } }; +