diff --git a/frontend/src/components/SessionLogoutTimeout.vue b/frontend/src/components/SessionLogoutTimeout.vue index 7a7cdfc5e..a41da851e 100644 --- a/frontend/src/components/SessionLogoutTimeout.vue +++ b/frontend/src/components/SessionLogoutTimeout.vue @@ -67,7 +67,7 @@ export default { } if (this.tokenExpiresInSeconds === 0) { this.$timer.stop('tokenExpires') - this.$store.commit('automaticallyLoggedOut', true) + this.toastInfoNoHide('Du wurdest automatisch abgemeldet') this.$emit('logout') } }, @@ -85,7 +85,7 @@ export default { }) .catch(() => { this.$timer.stop('tokenExpires') - this.$store.commit('automaticallyLoggedOut', true) + this.toastInfoNoHide('Du wurdest automatisch abgemeldet') this.$emit('logout') }) }, diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 5e2597c45..bd07af3ef 100755 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -123,11 +123,5 @@ export default { return !this.showPageMessage }, }, - mounted() { - if (this.$store.state.automaticallyLoggedOut) { - this.toastInfoNoHide('Du wurdest automatisch abgemeldet') - this.$store.commit('automaticallyLoggedOut', false) - } - }, } diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index 8f87cf468..1cd874c06 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -53,9 +53,6 @@ export const mutations = { hideAmountGDT: (state, hideAmountGDT) => { state.hideAmountGDT = !!hideAmountGDT }, - automaticallyLoggedOut: (state, automaticallyLoggedOut) => { - state.automaticallyLoggedOut = !!automaticallyLoggedOut - }, } export const actions = { @@ -71,7 +68,6 @@ export const actions = { commit('isAdmin', data.isAdmin) commit('hideAmountGDD', data.hideAmountGDD) commit('hideAmountGDT', data.hideAmountGDT) - commit('automaticallyLoggedOut', false) }, logout: ({ commit, state }) => { commit('token', null) @@ -112,7 +108,6 @@ try { publisherId: null, hideAmountGDD: null, hideAmountGDT: null, - automaticallyLoggedOut: false, }, getters: {}, // Syncronous mutation of the state