Move player count/max into playersHeading
This commit is contained in:
parent
4350fae1d5
commit
4feb46c641
@ -16,7 +16,7 @@
|
||||
|
||||
<template>
|
||||
<CollapsibleSection name="players" class="players">
|
||||
<template v-slot:heading>{{ messageHeading }} [{{ players.length }}/{{ maxPlayers }}]</template>
|
||||
<template v-slot:heading>{{ messageHeading }}</template>
|
||||
<template v-slot:default>
|
||||
<div class="section__content">
|
||||
<input v-if="players && searchEnabled" id="players__search" type="text" name="search"
|
||||
@ -49,7 +49,11 @@ export default defineComponent({
|
||||
|
||||
setup() {
|
||||
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),
|
||||
messageSkeletonPlayersSearch = computed(() => store.state.messages.playersSearchSkeleton),
|
||||
messagePlayersSearchPlaceholder = computed(() => store.state.messages.playersSearchPlaceholder),
|
||||
|
@ -78,7 +78,7 @@ export default class DynmapMapProvider extends MapProvider {
|
||||
chatErrorRequiresLogin: response['msg-chatrequireslogin'] || '',
|
||||
chatErrorCooldown: response.spammessage || '',
|
||||
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