From f5fbecc77f6ddf29a1587f07a4c49a210d45fa06 Mon Sep 17 00:00:00 2001 From: Bram Wiepjes <bramw@protonmail.com> Date: Mon, 26 Aug 2019 21:01:46 +0200 Subject: [PATCH 1/2] fixed bug where content of the previous page would show after refresh --- web-frontend/layouts/app.vue | 3 +-- web-frontend/pages/login/index.vue | 3 ++- web-frontend/pages/login/signup.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web-frontend/layouts/app.vue b/web-frontend/layouts/app.vue index b6593b1f7..808956f51 100644 --- a/web-frontend/layouts/app.vue +++ b/web-frontend/layouts/app.vue @@ -80,7 +80,6 @@ import Notifications from '@/components/notifications/Notifications' import GroupsContext from '@/components/group/GroupsContext' export default { - layout: 'default', middleware: 'authenticated', components: { GroupsContext, @@ -96,7 +95,7 @@ export default { methods: { logoff() { this.$store.dispatch('auth/logoff') - this.$nuxt.$router.replace({ name: 'login' }) + this.$nuxt.$router.push({ name: 'login' }) }, ...mapActions({ toggleCollapsed: 'sidebar/toggleCollapsed' diff --git a/web-frontend/pages/login/index.vue b/web-frontend/pages/login/index.vue index 73403b6be..c30621a31 100644 --- a/web-frontend/pages/login/index.vue +++ b/web-frontend/pages/login/index.vue @@ -103,7 +103,8 @@ export default { password: this.credentials.password }) .then(() => { - this.$nuxt.$router.replace({ name: 'app' }) + console.log(this.$nuxt) + this.$nuxt.$router.push({ name: 'app' }) }) .catch(error => { // If the status code is 400 the provided email or password is incorrect. diff --git a/web-frontend/pages/login/signup.vue b/web-frontend/pages/login/signup.vue index 2774114fb..dc058559d 100644 --- a/web-frontend/pages/login/signup.vue +++ b/web-frontend/pages/login/signup.vue @@ -144,7 +144,7 @@ export default { password: this.account.password }) .then(() => { - this.$nuxt.$router.replace({ name: 'app' }) + this.$nuxt.$router.push({ name: 'app' }) }) .catch(error => { this.error = error.responseError From c3f5aba22c95babea9a79cfdcf145f342d836cb9 Mon Sep 17 00:00:00 2001 From: Bram Wiepjes <bramw@protonmail.com> Date: Mon, 26 Aug 2019 21:03:10 +0200 Subject: [PATCH 2/2] removed console.log --- web-frontend/pages/login/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/web-frontend/pages/login/index.vue b/web-frontend/pages/login/index.vue index c30621a31..3b6bacf7e 100644 --- a/web-frontend/pages/login/index.vue +++ b/web-frontend/pages/login/index.vue @@ -103,7 +103,6 @@ export default { password: this.credentials.password }) .then(() => { - console.log(this.$nuxt) this.$nuxt.$router.push({ name: 'app' }) }) .catch(error => {