This commit is contained in:
2018-11-13 22:55:22 +00:00
parent a31093d50d
commit 3bb38b795c
4 changed files with 13 additions and 35 deletions

View File

@@ -9,6 +9,7 @@ export default new Vuex.Store({
state: {
authenticated: false,
apiUrl: "http://localhost:7575/api/v8.0/",
apiToken: "NOT-AUTHENTICATED",
userId: 0,
roles: 0,
localeText: {},
@@ -20,13 +21,15 @@ export default new Vuex.Store({
state.authenticated = data.authenticated;
state.userId = data.userId;
state.roles = data.roles;
state.apiToken = data.apiToken;
},
logout(state) {
state.apiToken = "NOT-AUTHENTICATED";
state.authenticated = false;
state.userId = 0;
state.roles = 0;
state.navItems = [];
state.localeText = [];
state.localeText = {};
},
addNavItem(state, data) {
state.navItems.push(data);