Fix player list not showing when expandUI is true

This commit is contained in:
James Lyne 2021-01-27 00:47:59 +00:00
parent 7d6c6e6ec7
commit 5eea0373ab
2 changed files with 5 additions and 5 deletions

View File

@ -85,6 +85,11 @@ export const actions: ActionTree<State, State> & Actions = {
commit(MutationTypes.SET_COMPONENTS, config.components);
commit(MutationTypes.SET_LOGGED_IN, config.loggedIn);
if(state.configuration.expandUI && !state.ui.smallScreen) {
commit(MutationTypes.SET_UI_ELEMENT_VISIBILITY, {element: 'players', state: true});
commit(MutationTypes.SET_UI_ELEMENT_VISIBILITY, {element: 'maps', state: true});
}
let worldName, mapName;
// Use config default world if it exists

View File

@ -81,11 +81,6 @@ export const mutations: MutationTree<State> & Mutations = {
// Sets configuration options from the initial config fetch
[MutationTypes.SET_CONFIGURATION](state: State, config: DynmapServerConfig) {
state.configuration = Object.assign(state.configuration, config);
if(state.configuration.expandUI && !state.ui.smallScreen) {
state.ui.visibleElements.add('players');
state.ui.visibleElements.add('maps');
}
},
//Set messsages from the initial config fetch