This commit is contained in:
@@ -11,23 +11,28 @@ export default new Vuex.Store({
|
||||
apiUrl: "http://localhost:7575/api/v8.0/",
|
||||
userId: 0,
|
||||
roles: 0,
|
||||
localeText: {},
|
||||
navItems: []
|
||||
},
|
||||
mutations: {
|
||||
setAuthentication(state, data) {
|
||||
login(state, data) {
|
||||
// mutate state
|
||||
state.authenticated = data.authenticated;
|
||||
state.userId = data.userId;
|
||||
state.roles = data.roles;
|
||||
},
|
||||
clearAuthentication(state) {
|
||||
logout(state) {
|
||||
state.authenticated = false;
|
||||
state.userId = 0;
|
||||
state.roles = 0;
|
||||
state.navItems = [];
|
||||
state.localeText = [];
|
||||
},
|
||||
addNavItem(state, data) {
|
||||
state.navItems.push(data);
|
||||
},
|
||||
addLocaleText(state, data) {
|
||||
state.localeText[data.key] = data.value;
|
||||
}
|
||||
},
|
||||
actions: {}
|
||||
|
||||
Reference in New Issue
Block a user