Shivam Mishra
2024-10-02 13:06:30 +05:30
committed by GitHub
parent e0bf2bd9d4
commit 42f6621afb
661 changed files with 15939 additions and 31194 deletions

View File

@@ -1,4 +1,3 @@
import Vue from 'vue';
import types from '../mutation-types';
import authAPI from '../../api/auth';
@@ -208,29 +207,29 @@ export const mutations = {
}
return account;
});
Vue.set(_state, 'currentUser', {
_state.currentUser = {
..._state.currentUser,
accounts,
});
};
},
[types.CLEAR_USER](_state) {
_state.currentUser = initialState.currentUser;
},
[types.SET_CURRENT_USER](_state, currentUser) {
Vue.set(_state, 'currentUser', currentUser);
_state.currentUser = currentUser;
},
[types.SET_CURRENT_USER_UI_SETTINGS](_state, { uiSettings }) {
Vue.set(_state, 'currentUser', {
_state.currentUser = {
..._state.currentUser,
ui_settings: {
..._state.currentUser.ui_settings,
...uiSettings,
},
});
};
},
[types.SET_CURRENT_USER_UI_FLAGS](_state, { isFetching }) {
Vue.set(_state, 'uiFlags', { isFetching });
_state.uiFlags = { isFetching };
},
};