Move player count/max into playersHeading
This commit is contained in:
parent
4350fae1d5
commit
4feb46c641
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CollapsibleSection name="players" class="players">
|
<CollapsibleSection name="players" class="players">
|
||||||
<template v-slot:heading>{{ messageHeading }} [{{ players.length }}/{{ maxPlayers }}]</template>
|
<template v-slot:heading>{{ messageHeading }}</template>
|
||||||
<template v-slot:default>
|
<template v-slot:default>
|
||||||
<div class="section__content">
|
<div class="section__content">
|
||||||
<input v-if="players && searchEnabled" id="players__search" type="text" name="search"
|
<input v-if="players && searchEnabled" id="players__search" type="text" name="search"
|
||||||
@ -49,7 +49,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore(),
|
const store = useStore(),
|
||||||
messageHeading = computed(() => store.state.messages.playersHeading),
|
messageHeading = computed(() => {
|
||||||
|
return store.state.messages.playersHeading
|
||||||
|
.replace('{cur}', players.value.length)
|
||||||
|
.replace('{max}', maxPlayers.value);
|
||||||
|
}),
|
||||||
messageSkeletonPlayers = computed(() => store.state.messages.playersSkeleton),
|
messageSkeletonPlayers = computed(() => store.state.messages.playersSkeleton),
|
||||||
messageSkeletonPlayersSearch = computed(() => store.state.messages.playersSearchSkeleton),
|
messageSkeletonPlayersSearch = computed(() => store.state.messages.playersSearchSkeleton),
|
||||||
messagePlayersSearchPlaceholder = computed(() => store.state.messages.playersSearchPlaceholder),
|
messagePlayersSearchPlaceholder = computed(() => store.state.messages.playersSearchPlaceholder),
|
||||||
|
@ -78,7 +78,7 @@ export default class DynmapMapProvider extends MapProvider {
|
|||||||
chatErrorRequiresLogin: response['msg-chatrequireslogin'] || '',
|
chatErrorRequiresLogin: response['msg-chatrequireslogin'] || '',
|
||||||
chatErrorCooldown: response.spammessage || '',
|
chatErrorCooldown: response.spammessage || '',
|
||||||
worldsHeading: response['msg-maptypes'] || '',
|
worldsHeading: response['msg-maptypes'] || '',
|
||||||
playersHeading: response['msg-players'] || '',
|
playersHeading: response['msg-players'] ? `${response['msg-players']} ({cur}/{max})` : '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user