ibt2/src/store.js

24 lines
447 B
JavaScript

/*
* Shared state of the ibt2 app.
*/
export default {
state: {
loggedInUser: {username: ''},
settings: {}
},
mutations: {
clearLoggedInUser(state, user) {
state.loggedInUser = {username: ''};
},
setLoggedInUser(state, user) {
state.loggedInUser = user;
},
updateSettings(state, settings) {
state.settings = settings;
}
}
};