diff --git a/src/store/actions.ts b/src/store/actions.ts index e7bf094..d5f8ff3 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -85,6 +85,11 @@ export const actions: ActionTree & 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 diff --git a/src/store/mutations.ts b/src/store/mutations.ts index 40375c1..9c01951 100644 --- a/src/store/mutations.ts +++ b/src/store/mutations.ts @@ -81,11 +81,6 @@ export const mutations: MutationTree & 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