Rename world/map title to displayName

This commit is contained in:
James Lyne 2021-07-24 20:12:18 +01:00
parent c202def955
commit ad9af04e9e
4 changed files with 9 additions and 9 deletions

View File

@ -16,13 +16,13 @@
<template> <template>
<div class="world"> <div class="world">
<span class="world__name" aria-hidden="true">{{ world.title }}</span> <span class="world__name" aria-hidden="true">{{ world.displayName }}</span>
<div class="world__maps menu"> <div class="world__maps menu">
<template v-for="[key, map] in world.maps" :key="`${world.name}_${key}`"> <template v-for="[key, map] in world.maps" :key="`${world.name}_${key}`">
<input :id="`${name}-${world.name}-${key}`" type="radio" :name="name" <input :id="`${name}-${world.name}-${key}`" type="radio" :name="name"
v-bind:value="[world.name,map.name]" v-model="currentMap" v-bind:value="[world.name,map.name]" v-model="currentMap"
:aria-labelledby="`${name}-${world.name}-${key}-label`"> :aria-labelledby="`${name}-${world.name}-${key}-label`">
<label :id="`${name}-${world.name}-${key}-label`" class="map" :for="`${name}-${world.name}-${key}`" :title="`${world.title} - ${map.title}`"> <label :id="`${name}-${world.name}-${key}-label`" class="map" :for="`${name}-${world.name}-${key}`" :title="`${world.displayName} - ${map.displayName}`">
<SvgIcon :name="map.getIcon()"></SvgIcon> <SvgIcon :name="map.getIcon()"></SvgIcon>
</label> </label>
</template> </template>

2
src/index.d.ts vendored
View File

@ -127,9 +127,9 @@ interface LiveAtlasSortedPlayers extends Array<LiveAtlasPlayer> {
interface LiveAtlasWorldDefinition { interface LiveAtlasWorldDefinition {
seaLevel: number; seaLevel: number;
name: string; name: string;
displayName: string;
dimension: LiveAtlasDimension; dimension: LiveAtlasDimension;
protected: boolean; protected: boolean;
title: string;
height: number; height: number;
center: Coordinate; center: Coordinate;
maps: Map<string, LiveAtlasMapDefinition>; maps: Map<string, LiveAtlasMapDefinition>;

View File

@ -21,7 +21,7 @@ import {LiveAtlasProjection} from "@/model/LiveAtlasProjection";
export interface LiveAtlasMapDefinitionOptions { export interface LiveAtlasMapDefinitionOptions {
world: LiveAtlasWorldDefinition; world: LiveAtlasWorldDefinition;
name: string; name: string;
title?: string; displayName?: string;
icon?: string; icon?: string;
background?: string; background?: string;
nightAndDay?: boolean; nightAndDay?: boolean;
@ -40,7 +40,7 @@ export default class LiveAtlasMapDefinition {
readonly world: LiveAtlasWorldDefinition; readonly world: LiveAtlasWorldDefinition;
readonly name: string; readonly name: string;
readonly icon?: string; readonly icon?: string;
readonly title: string; readonly displayName: string;
readonly background: string; readonly background: string;
readonly nightAndDay: boolean; readonly nightAndDay: boolean;
readonly backgroundDay?: string; readonly backgroundDay?: string;
@ -57,7 +57,7 @@ export default class LiveAtlasMapDefinition {
this.world = options.world; //Ignore append_to_world here otherwise things break this.world = options.world; //Ignore append_to_world here otherwise things break
this.name = options.name; this.name = options.name;
this.icon = options.icon || undefined; this.icon = options.icon || undefined;
this.title = options.title || ''; this.displayName = options.displayName || '';
this.background = options.background || '#000000'; this.background = options.background || '#000000';
this.nightAndDay = options.nightAndDay || false; this.nightAndDay = options.nightAndDay || false;

View File

@ -96,12 +96,12 @@ export default class DynmapMapProvider extends MapProvider {
} }
worlds.set(world.name, { worlds.set(world.name, {
seaLevel: world.sealevel || 64,
name: world.name, name: world.name,
displayName: world.title || '',
dimension: worldType, dimension: worldType,
protected: world.protected || false, protected: world.protected || false,
title: world.title || '',
height: world.height || 256, height: world.height || 256,
seaLevel: world.sealevel || 64,
center: { center: {
x: world.center.x || 0, x: world.center.x || 0,
y: world.center.y || 0, y: world.center.y || 0,
@ -132,7 +132,7 @@ export default class DynmapMapProvider extends MapProvider {
nightAndDay: map.nightandday || false, nightAndDay: map.nightandday || false,
prefix: map.prefix || '', prefix: map.prefix || '',
protected: map.protected || false, protected: map.protected || false,
title: map.title || '', displayName: map.title || '',
mapToWorld: map.maptoworld || undefined, mapToWorld: map.maptoworld || undefined,
worldToMap: map.worldtomap || undefined, worldToMap: map.worldtomap || undefined,
nativeZoomLevels: map.mapzoomout || 1, nativeZoomLevels: map.mapzoomout || 1,