remove store way

This commit is contained in:
ogerly 2023-02-09 16:19:21 +01:00
parent 56e3e7c5de
commit af47bf847b
3 changed files with 2 additions and 13 deletions

View File

@ -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')
})
},

View File

@ -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)
}
},
}
</script>

View File

@ -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