Add mutations that we'll need so vuex-persist actually works
This commit is contained in:
parent
8caac8812e
commit
3df1218ebb
1 changed files with 17 additions and 1 deletions
|
|
@ -59,9 +59,25 @@ export default new Vuex.Store({
|
|||
return state[`team_${3 - state.team}`].name;
|
||||
};
|
||||
return ``;
|
||||
}
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
player(state, data) {
|
||||
if (data.name)
|
||||
state.name = data.name
|
||||
if (data.role)
|
||||
state.role = data.role
|
||||
if (data.team)
|
||||
state.team = data.team
|
||||
if (data.host)
|
||||
state.is_host = data.host
|
||||
},
|
||||
game_code(state, game_code) {
|
||||
state.game_code = game_code;
|
||||
},
|
||||
view(state, target) {
|
||||
state.view = target;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue