remove sizeDE, sizeGB from store. commit logout to store before redirect

This commit is contained in:
Moriz Wahl 2021-04-20 12:09:07 +02:00
parent c3c4b52807
commit dd9b10a4cb
3 changed files with 2 additions and 11 deletions

View File

@ -16,8 +16,6 @@ export const store = new Vuex.Store({
session_id: null, session_id: null,
email: '', email: '',
language: 'en', language: 'en',
sizeDE: 'normal',
sizeGB: 'big',
user: { user: {
name: '', name: '',
balance: 0, balance: 0,
@ -37,13 +35,6 @@ export const store = new Vuex.Store({
mutations: { mutations: {
language: (state, language) => { language: (state, language) => {
state.language = language state.language = language
if (state.language == 'de') {
state.sizeDE = 'big'
state.sizeGB = 'normal'
} else {
state.sizeDE = 'normal'
state.sizeGB = 'big'
}
}, },
email: (state, email) => { email: (state, email) => {
state.email = email state.email = email

View File

@ -116,8 +116,8 @@ export default {
this.activeNotifications = false this.activeNotifications = false
}, },
logout() { logout() {
this.$router.push('/login')
this.$store.dispatch('logout') this.$store.dispatch('logout')
this.$router.push('/login')
}, },
}, },
} }

View File

@ -188,8 +188,8 @@ export default {
this.$router.push('/thx') this.$router.push('/thx')
} else { } else {
// todo: Display a proper error message! // todo: Display a proper error message!
this.$router.push('/login')
this.$store.dispatch('logout') this.$store.dispatch('logout')
this.$router.push('/login')
} }
}, },
}, },