diff --git a/index.html b/index.html index b37b71a..6ea837d 100644 --- a/index.html +++ b/index.html @@ -147,8 +147,11 @@ playersSearch: true, // Use more compact pre-2.0 player marker style - compactPlayerMarkers: true, - } + compactPlayerMarkers: false, + }, + + // Config version. Do not modify. + version: 1 }; diff --git a/src/index.d.ts b/src/index.d.ts index fc53793..7e47afa 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -67,6 +67,7 @@ interface LiveAtlasGlobalConfig { servers: Map; messages: LiveAtlasGlobalMessageConfig; ui: LiveAtlasUIConfig; + version?: number; } interface LiveAtlasServerDefinition { diff --git a/src/util/config.ts b/src/util/config.ts index dbd880b..cd2f364 100644 --- a/src/util/config.ts +++ b/src/util/config.ts @@ -17,6 +17,9 @@ import {LiveAtlasGlobalConfig, LiveAtlasServerDefinition} from "@/index"; import ConfigurationError from "@/errors/ConfigurationError"; import {DynmapUrlConfig} from "@/dynmap"; +import {useStore} from "@/store"; + +const expectedConfigVersion = 1; const validateLiveAtlasConfiguration = (config: any): Map => { const check = '\nCheck your server configuration in index.html is correct.', @@ -125,6 +128,10 @@ export const getServerDefinitions = (config: LiveAtlasGlobalConfig): Map