This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git

commit 7d51ead00f2878dda4e5b3d4b37d745f14c102a2
Author: Rohit Yadav <[email protected]>
AuthorDate: Mon Nov 4 12:48:09 2019 +0530

    store: reset theme on logout
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 src/store/modules/user.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 435fa46..d138107 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -18,7 +18,7 @@
 import Vue from 'vue'
 import md5 from 'md5'
 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'
 
 const user = {
@@ -57,6 +57,9 @@ const user = {
     SET_ASYNC_JOB_IDS: (state, jobsJsonArray) => {
       Vue.ls.set(ASYNC_JOB_IDS, jobsJsonArray)
       state.asyncJobIds = jobsJsonArray
+    },
+    RESET_THEME: (state) => {
+      Vue.ls.set(DEFAULT_THEME, 'light')
     }
   },
 
@@ -121,6 +124,7 @@ const user = {
         commit('SET_TOKEN', '')
         commit('SET_PROJECT', {})
         commit('SET_APIS', {})
+        commit('RESET_THEME')
         Vue.ls.remove(CURRENT_PROJECT)
         Vue.ls.remove(ACCESS_TOKEN)
         Vue.ls.remove(ASYNC_JOB_IDS)

Reply via email to