Fix build
This commit is contained in:
parent
eadca7acc8
commit
74ccafefbc
@ -15,7 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<input :id="`player-${player.account}`" type="radio" name="player" v-bind:value="player" v-model="followTarget"
|
<input :id="`player-${player.account}`" type="radio" name="player" v-bind:value="player.account" v-model="followTarget"
|
||||||
@click.prevent="onInputClick" />
|
@click.prevent="onInputClick" />
|
||||||
<label :for="`player-${player.account}`"
|
<label :for="`player-${player.account}`"
|
||||||
:class="{'player': true, 'player--hidden' : !!player.hidden, 'player--other-world': otherWorld}" :title="title"
|
:class="{'player': true, 'player--hidden' : !!player.hidden, 'player--other-world': otherWorld}" :title="title"
|
||||||
@ -58,7 +58,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
followTarget = computed(() => store.state.followTarget),
|
followTarget = computed(() => store.state.followTarget ? store.state.followTarget.account : undefined),
|
||||||
|
|
||||||
pan = () => {
|
pan = () => {
|
||||||
if(!props.player.hidden) {
|
if(!props.player.hidden) {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<input :id="`server-${server.id}`" type="radio" name="server" v-bind:value="server" v-model="currentServer">
|
<input :id="`server-${server.id}`" type="radio" name="server" v-bind:value="server.id" v-model="currentServer">
|
||||||
<label :for="`server-${server.id}`">{{ server.label || server.id }}</label>
|
<label :for="`server-${server.id}`">{{ server.label || server.id }}</label>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -37,10 +37,11 @@ export default defineComponent({
|
|||||||
computed: {
|
computed: {
|
||||||
currentServer: {
|
currentServer: {
|
||||||
get() {
|
get() {
|
||||||
return useStore().state.currentServer;
|
const store = useStore();
|
||||||
|
return store.state.currentServer ? store.state.currentServer.id : undefined;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value: string) {
|
||||||
useStore().commit(MutationTypes.SET_CURRENT_SERVER, value.id);
|
useStore().commit(MutationTypes.SET_CURRENT_SERVER, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<template v-slot:heading>{{ heading }}</template>
|
<template v-slot:heading>{{ heading }}</template>
|
||||||
<template v-slot:default>
|
<template v-slot:default>
|
||||||
<RadioList v-if="worlds.size" class="section__content" aria-labelledby="maps-heading">
|
<RadioList v-if="worlds.size" class="section__content" aria-labelledby="maps-heading">
|
||||||
<WorldListItem :world="world" v-for="[name, world] in worlds" :key="`${prefix}_${currentServer.id}_${name}`"></WorldListItem>
|
<WorldListItem :world="world" v-for="[name, world] in worlds" :key="`${prefix}_${currentServer}_${name}`"></WorldListItem>
|
||||||
</RadioList>
|
</RadioList>
|
||||||
<div v-else class="section__skeleton">{{ skeletonWorlds }}</div>
|
<div v-else class="section__skeleton">{{ skeletonWorlds }}</div>
|
||||||
</template>
|
</template>
|
||||||
@ -41,6 +41,13 @@ export default defineComponent({
|
|||||||
WorldListItem
|
WorldListItem
|
||||||
},
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
prefix: {
|
||||||
|
type: String,
|
||||||
|
default: 'map',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
heading() {
|
heading() {
|
||||||
return useStore().state.messages.worldsHeading;
|
return useStore().state.messages.worldsHeading;
|
||||||
@ -55,7 +62,8 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
currentServer() {
|
currentServer() {
|
||||||
return useStore().state.currentServer;
|
const store = useStore();
|
||||||
|
return store.state.currentServer ? store.state.currentServer.id : undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
<span class="world__name" aria-hidden="true">{{ world.title }}</span>
|
<span class="world__name" aria-hidden="true">{{ world.title }}</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" v-bind:value="map" v-model="currentMap" :aria-labelledby="`${name}-${world.name}-${key}-label`">
|
<input :id="`${name}-${world.name}-${key}`" type="radio" :name="name"
|
||||||
|
v-bind:value="[world.name,map.name]" v-model="currentMap"
|
||||||
|
: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.title} - ${map.title}`">
|
||||||
<SvgIcon :name="getMapIcon(map)"></SvgIcon>
|
<SvgIcon :name="getMapIcon(map)"></SvgIcon>
|
||||||
</label>
|
</label>
|
||||||
@ -63,10 +65,11 @@ export default defineComponent({
|
|||||||
computed: {
|
computed: {
|
||||||
currentMap: {
|
currentMap: {
|
||||||
get() {
|
get() {
|
||||||
return useStore().state.currentMap;
|
const store = useStore();
|
||||||
|
return store.state.currentMap ? `${store.state.currentMap.world.name}_${store.state.currentMap.name}` : undefined;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value: string[]) {
|
||||||
useStore().commit(MutationTypes.SET_CURRENT_MAP, {worldName: this.world.name, mapName: value.name});
|
useStore().commit(MutationTypes.SET_CURRENT_MAP, {worldName: value[0], mapName: value[1]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user