Move grayHiddenPlayers to playerMarkers component
This commit is contained in:
parent
7bff12b729
commit
b3f186a197
@ -44,7 +44,7 @@ export default defineComponent({
|
|||||||
setup(props) {
|
setup(props) {
|
||||||
const store = useStore(),
|
const store = useStore(),
|
||||||
otherWorld = computed(() => {
|
otherWorld = computed(() => {
|
||||||
return store.state.configuration.grayHiddenPlayers
|
return store.state.components.playerMarkers?.grayHiddenPlayers
|
||||||
&& !props.player.hidden
|
&& !props.player.hidden
|
||||||
&& (!store.state.currentWorld || store.state.currentWorld.name !== props.player.location.world);
|
&& (!store.state.currentWorld || store.state.currentWorld.name !== props.player.location.world);
|
||||||
}),
|
}),
|
||||||
|
1
src/index.d.ts
vendored
1
src/index.d.ts
vendored
@ -280,6 +280,7 @@ interface LiveAtlasPartialComponentConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface LiveAtlasPlayerMarkerConfig {
|
interface LiveAtlasPlayerMarkerConfig {
|
||||||
|
grayHiddenPlayers: boolean;
|
||||||
hideByDefault: boolean;
|
hideByDefault: boolean;
|
||||||
layerName: string;
|
layerName: string;
|
||||||
layerPriority: number;
|
layerPriority: number;
|
||||||
|
@ -56,7 +56,6 @@ export default class DynmapMapProvider extends MapProvider {
|
|||||||
|
|
||||||
private static buildServerConfig(response: any): LiveAtlasServerConfig {
|
private static buildServerConfig(response: any): LiveAtlasServerConfig {
|
||||||
return {
|
return {
|
||||||
grayHiddenPlayers: response.grayplayerswhenhidden || false,
|
|
||||||
defaultMap: response.defaultmap || undefined,
|
defaultMap: response.defaultmap || undefined,
|
||||||
defaultWorld: response.defaultworld || undefined,
|
defaultWorld: response.defaultworld || undefined,
|
||||||
defaultZoom: response.defaultzoom || 0,
|
defaultZoom: response.defaultzoom || 0,
|
||||||
@ -172,6 +171,7 @@ export default class DynmapMapProvider extends MapProvider {
|
|||||||
|
|
||||||
case "playermarkers":
|
case "playermarkers":
|
||||||
components.playerMarkers = {
|
components.playerMarkers = {
|
||||||
|
grayHiddenPlayers: response.grayplayerswhenhidden || false,
|
||||||
hideByDefault: component.hidebydefault || false,
|
hideByDefault: component.hidebydefault || false,
|
||||||
layerName: component.label || "Players",
|
layerName: component.label || "Players",
|
||||||
layerPriority: component.layerprio || 0,
|
layerPriority: component.layerprio || 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user