add userLocation in store

This commit is contained in:
clauspeterhuebner 2025-02-26 16:20:38 +01:00
parent dc9dc81393
commit b46a7a6662

View File

@ -72,6 +72,9 @@ export const mutations = {
setDarkMode: (state, darkMode) => {
state.darkMode = !!darkMode
},
userLocation: (state, userLocation) => {
state.userLocation = userLocation
},
redirectPath: (state, redirectPath) => {
state.redirectPath = redirectPath || '/overview'
},
@ -99,6 +102,7 @@ export const actions = {
commit('hideAmountGDD', data.hideAmountGDD)
commit('hideAmountGDT', data.hideAmountGDT)
commit('setDarkMode', data.darkMode)
commit('userLocation', data.userLocation)
},
logout: ({ commit, state }) => {
commit('token', null)
@ -119,6 +123,7 @@ export const actions = {
commit('hideAmountGDT', true)
commit('email', '')
commit('setDarkMode', false)
commit('userLocation', null)
commit('redirectPath', '/overview')
localStorage.clear()
},
@ -158,6 +163,7 @@ try {
hideAmountGDT: null,
email: '',
darkMode: false,
userLocation: null,
redirectPath: '/overview',
transactionToHighlightId: '',
},