mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
store: reset theme on logout
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
bef1907d53
commit
fc07b9e372
@ -18,7 +18,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import md5 from 'md5'
|
import md5 from 'md5'
|
||||||
import { login, logout, api } from '@/api'
|
import { login, logout, api } from '@/api'
|
||||||
import { ACCESS_TOKEN, CURRENT_PROJECT, ASYNC_JOB_IDS } from '@/store/mutation-types'
|
import { ACCESS_TOKEN, CURRENT_PROJECT, DEFAULT_THEME, ASYNC_JOB_IDS } from '@/store/mutation-types'
|
||||||
import { welcome } from '@/utils/util'
|
import { welcome } from '@/utils/util'
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
@ -57,6 +57,9 @@ const user = {
|
|||||||
SET_ASYNC_JOB_IDS: (state, jobsJsonArray) => {
|
SET_ASYNC_JOB_IDS: (state, jobsJsonArray) => {
|
||||||
Vue.ls.set(ASYNC_JOB_IDS, jobsJsonArray)
|
Vue.ls.set(ASYNC_JOB_IDS, jobsJsonArray)
|
||||||
state.asyncJobIds = jobsJsonArray
|
state.asyncJobIds = jobsJsonArray
|
||||||
|
},
|
||||||
|
RESET_THEME: (state) => {
|
||||||
|
Vue.ls.set(DEFAULT_THEME, 'light')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -121,6 +124,7 @@ const user = {
|
|||||||
commit('SET_TOKEN', '')
|
commit('SET_TOKEN', '')
|
||||||
commit('SET_PROJECT', {})
|
commit('SET_PROJECT', {})
|
||||||
commit('SET_APIS', {})
|
commit('SET_APIS', {})
|
||||||
|
commit('RESET_THEME')
|
||||||
Vue.ls.remove(CURRENT_PROJECT)
|
Vue.ls.remove(CURRENT_PROJECT)
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
Vue.ls.remove(ASYNC_JOB_IDS)
|
Vue.ls.remove(ASYNC_JOB_IDS)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user