+
+
\ No newline at end of file
diff --git a/src/components/TheWelcome.vue b/src/components/TheWelcome.vue
deleted file mode 100644
index 5e64625..0000000
--- a/src/components/TheWelcome.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
- Documentation
-
- Vue’s
- official documentation
- provides you with all information you need to get started.
-
-
-
-
-
-
- Tooling
-
- This project is served and bundled with
- Vite. The
- recommended IDE setup is
- VSCode +
- Volar. If
- you need to test your components and web pages, check out
- Cypress and
- Cypress Component Testing.
-
-
-
- More instructions are available in README.md.
-
-
-
-
-
-
- Ecosystem
-
- Get official tools and libraries for your project:
- Pinia,
- Vue Router,
- Vue Test Utils, and
- Vue Dev Tools. If
- you need more resources, we suggest paying
- Awesome Vue
- a visit.
-
-
-
-
-
-
- Community
-
- Got stuck? Ask your question on
- Vue Land, our official
- Discord server, or
- StackOverflow. You should also subscribe to
- our mailing list and follow
- the official
- @vuejs
- twitter account for latest news in the Vue world.
-
-
-
-
-
-
- Support Vue
-
- As an independent project, Vue relies on community backing for its sustainability. You can help
- us by
- becoming a sponsor.
-
-
diff --git a/src/components/WelcomeItem.vue b/src/components/WelcomeItem.vue
deleted file mode 100644
index a5eca70..0000000
--- a/src/components/WelcomeItem.vue
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main.js b/src/main.js
index 643ad47..080705d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -8,7 +8,6 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { faUserSecret } from '@fortawesome/free-solid-svg-icons'
import './assets/main.css'
-import AuthHelper from './authentication/AuthHelper'
/* add icons to the library */
library.add(faUserSecret)
diff --git a/src/router/index.js b/src/router/index.js
index ee08e3b..0090ef4 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,6 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
-import AuthHelper from '../authentication/AuthHelper'
+import store from '../store/index'
+import { getKeycloak, keycloakSetup } from '../authentication/AuthHelper'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
@@ -13,13 +14,59 @@ const router = createRouter({
requiresAuth: false
}
},
+ {
+ path: '/contracts',
+ name: 'contracts',
+ // this page is lazy-loaded when the route is visited.
+ component: () => import('../views/ContractsView.vue'),
+ meta: {
+ requiresAuth: true
+ }
+ },
+ {
+ path: '/support',
+ name: 'support',
+ // this page is lazy-loaded when the route is visited.
+ component: () => import('../views/SupportView.vue'),
+ meta: {
+ requiresAuth: true
+ }
+ },
+ {
+ path: '/support',
+ name: 'support',
+ // this page is lazy-loaded when the route is visited.
+ component: () => import('../views/AdministrationView.vue'),
+ meta: {
+ requiresAuth: true,
+ requiresAdmin: true
+ }
+ },
+ {
+ path: '/arbeiten',
+ name: 'arbeiten',
+ // this page is lazy-loaded when the route is visited.
+ component: () => import('../views/ArbeitenView.vue'),
+ meta: {
+ requiresAuth: false
+ }
+ },
+ {
+ path: '/contact',
+ name: 'contact',
+ // this page is lazy-loaded when the route is visited.
+ component: () => import('../views/ContactView.vue'),
+ meta: {
+ requiresAuth: false
+ }
+ },
{
path: '/about',
name: 'about',
// this page is lazy-loaded when the route is visited.
component: () => import('../views/AboutView.vue'),
meta: {
- requiresAuth: true
+ requiresAuth: false
}
},
{
@@ -43,10 +90,11 @@ const router = createRouter({
router.beforeEach(async (to, from, next) => {
if (to.meta.requiresAuth === true) {
- if (AuthHelper.getKeycloak() === null) {
- await AuthHelper.setup()
+ if (getKeycloak() === null) {
+ await keycloakSetup()
+ store.commit('initKeycloak', getKeycloak())
}
- if (!AuthHelper.getKeycloak().authenticated) {
+ if (!getKeycloak().authenticated) {
next('/forbidden')
}
next()
diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue
index 6b58874..36cabee 100644
--- a/src/views/AboutView.vue
+++ b/src/views/AboutView.vue
@@ -1,15 +1,17 @@
-
-
-
This is an about page
-
-
-
-
+
+
+
+
+
+
This is a About page
+
+
+
\ No newline at end of file
diff --git a/src/views/AdministrationView.vue b/src/views/AdministrationView.vue
new file mode 100644
index 0000000..30aeb81
--- /dev/null
+++ b/src/views/AdministrationView.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
This is an Administration page
+
+
+
\ No newline at end of file
diff --git a/src/views/ArbeitenView.vue b/src/views/ArbeitenView.vue
new file mode 100644
index 0000000..9b24506
--- /dev/null
+++ b/src/views/ArbeitenView.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
This is an Arbeiten page
+
+
+
\ No newline at end of file
diff --git a/src/views/ContactView.vue b/src/views/ContactView.vue
new file mode 100644
index 0000000..5c84ee3
--- /dev/null
+++ b/src/views/ContactView.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
This is an Contact page
+
+
+
\ No newline at end of file
diff --git a/src/views/ContractsView.vue b/src/views/ContractsView.vue
new file mode 100644
index 0000000..124c4b3
--- /dev/null
+++ b/src/views/ContractsView.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
This is an Contracts page
+
+
+
\ No newline at end of file
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 6bb706f..317e6ed 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,9 +1,17 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
This is a Home page
+
+
+
\ No newline at end of file
diff --git a/src/views/SupportView.vue b/src/views/SupportView.vue
new file mode 100644
index 0000000..48df283
--- /dev/null
+++ b/src/views/SupportView.vue
@@ -0,0 +1,17 @@
+
+
+
+
+