diff --git a/frontend/quasar.conf.js b/frontend/quasar.conf.js
index 0528ca8..42861b5 100644
--- a/frontend/quasar.conf.js
+++ b/frontend/quasar.conf.js
@@ -63,6 +63,7 @@ module.exports = function (ctx) {
'QSpinnerPuff',
'QExpansionItem',
'QParallax',
+ 'QEditor',
],
directives: [
@@ -103,7 +104,7 @@ module.exports = function (ctx) {
devServer: {
// https: true,
port: 8081,
- open: true // opens browser window automatically
+ open: false // opens browser window automatically
},
// animations: 'all' --- includes all animations
diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue
index 13c0770..c5d83e3 100644
--- a/frontend/src/pages/Login.vue
+++ b/frontend/src/pages/Login.vue
@@ -82,7 +82,6 @@
// },
mounted () {
this.isAuthenticated();
- //this.pollData();
console.log("mounted: initiated");
},
methods: {
@@ -100,7 +99,8 @@
.then((response) => {
console.log("GET/POST http://localhost:8080/api/login/ - response: " + response.data);
//this.user.token = response.data;
- localStorage.setItem('userToken', JSON.stringify(response));
+ localStorage.setItem('userToken', JSON.stringify(response.data));
+ //localStorage.setItem('userToken', response.data);
this.isAuthenticated();
})
.catch((error) => {
@@ -110,8 +110,9 @@
},
isAuthenticated: function () {
console.log("isAuthenticated()");
- console.log(localStorage.getItem('userToken'));
- if (localStorage.getItem('userToken')) { // TODO hier muss Abfrage mit API, z.B. /api/user?token="ME" stattfinden.
+ console.log("content of localstorage: ");
+ console.log(JSON.parse(localStorage.getItem('userToken')));
+ if (localStorage.getItem('userToken')) {
this.user.isAuthenticated = true;
} else {
this.user.isAuthenticated = false;
@@ -119,10 +120,19 @@
},
logout: function () {
console.log("logout()");
- console.log(localStorage.getItem('userToken'));
- localStorage.removeItem('userToken');
- console.log(localStorage.getItem('userToken'));
- this.isAuthenticated()
+ console.log(JSON.parse(localStorage.getItem('userToken')));
+ this.$axios.get('http://localhost:8080/api/logout', {
+ params: {
+ token: JSON.parse(localStorage.getItem('userToken'))
+ }
+ })
+ .then((response) => {
+ console.log("GET/POST http://localhost:8080/api/logout/ - response: " + response.data);
+ localStorage.removeItem('userToken');
+ this.isAuthenticated();
+ })
+ .catch((error) => {
+ });
},
},
};
diff --git a/frontend/src/pages/Overview.vue b/frontend/src/pages/Overview.vue
index 5295f00..f9285c7 100644
--- a/frontend/src/pages/Overview.vue
+++ b/frontend/src/pages/Overview.vue
@@ -9,17 +9,51 @@
active-bg-color="bg-grey-1"
active-color="cyan-14"
indicator-color="cyan-14"
- narrow-indicator
switch-indicator
>
-