Move login from configuration to components
This commit is contained in:
parent
e46a97df15
commit
c202def955
2
src/dynmap.d.ts
vendored
2
src/dynmap.d.ts
vendored
@ -43,7 +43,6 @@ interface DynmapServerConfig {
|
||||
followMap?: string;
|
||||
followZoom: number;
|
||||
title: string;
|
||||
loginEnabled: boolean;
|
||||
maxPlayers: number;
|
||||
grayHiddenPlayers: boolean;
|
||||
expandUI: boolean;
|
||||
@ -60,6 +59,7 @@ interface DynmapComponentConfig {
|
||||
chatBox?: DynmapChatBoxConfig;
|
||||
chatSending?: DynmapChatSendingConfig;
|
||||
chatBalloons: boolean;
|
||||
login: boolean;
|
||||
}
|
||||
|
||||
interface DynmapMarkersConfig {
|
||||
|
@ -63,7 +63,6 @@ export default class DynmapMapProvider extends MapProvider {
|
||||
followMap: response.followmap || undefined,
|
||||
followZoom: response.followzoom || 0,
|
||||
title: response.title.replace(titleColoursRegex, '') || 'Dynmap',
|
||||
loginEnabled: response['login-enabled'] || false,
|
||||
maxPlayers: response.maxcount || 0,
|
||||
expandUI: response.sidebaropened && response.sidebaropened !== 'false', //Sent as a string for some reason
|
||||
};
|
||||
@ -158,6 +157,7 @@ export default class DynmapMapProvider extends MapProvider {
|
||||
linkControl: false,
|
||||
clockControl: undefined,
|
||||
logoControls: [],
|
||||
login: response['login-enabled'] || false,
|
||||
};
|
||||
|
||||
(response.components || []).forEach((component: any) => {
|
||||
|
@ -94,7 +94,6 @@ export const state: State = {
|
||||
followMap: '',
|
||||
followZoom: 0,
|
||||
title: '',
|
||||
loginEnabled: false,
|
||||
maxPlayers: 0,
|
||||
grayHiddenPlayers: false,
|
||||
expandUI: false,
|
||||
@ -193,7 +192,10 @@ export const state: State = {
|
||||
chatBox: undefined,
|
||||
|
||||
//Chat balloons showing messages above player markers
|
||||
chatBalloons: false
|
||||
chatBalloons: false,
|
||||
|
||||
//Login/registering (not currently implemented)
|
||||
login: false,
|
||||
},
|
||||
|
||||
followTarget: undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user