Player list heading fixes
This commit is contained in:
parent
f4aca39975
commit
b143fc1561
@ -74,7 +74,7 @@ export default defineComponent({
|
||||
following = computed(() => store.state.followTarget),
|
||||
|
||||
messageWorlds = computed(() => store.state.messages.worldsHeading),
|
||||
messagePlayers = computed(() => store.state.messages.playersHeading),
|
||||
messagePlayers = computed(() => store.getters.playersHeading),
|
||||
|
||||
playerMakersEnabled = computed(() => !!store.state.components.playerMarkers),
|
||||
|
||||
|
@ -49,11 +49,7 @@ export default defineComponent({
|
||||
|
||||
setup() {
|
||||
const store = useStore(),
|
||||
messageHeading = computed(() => {
|
||||
return store.state.messages.playersHeading
|
||||
.replace('{cur}', players.value.length.toString())
|
||||
.replace('{max}', maxPlayers.value.toString());
|
||||
}),
|
||||
messageHeading = computed(() => store.getters.playersHeading),
|
||||
messageSkeletonPlayers = computed(() => store.state.messages.playersSkeleton),
|
||||
messageSkeletonPlayersSearch = computed(() => store.state.messages.playersSearchSkeleton),
|
||||
messagePlayersSearchPlaceholder = computed(() => store.state.messages.playersSearchPlaceholder),
|
||||
|
@ -25,6 +25,7 @@ export type Getters = {
|
||||
night(state: State): boolean;
|
||||
mapBackground(state: State, getters: GetterTree<State, State> & Getters): string;
|
||||
url(state: State, getters: GetterTree<State, State> & Getters): string;
|
||||
playersHeading(state: State, getters: GetterTree<State, State> & Getters): string;
|
||||
}
|
||||
|
||||
export const getters: GetterTree<State, State> & Getters = {
|
||||
@ -72,4 +73,10 @@ export const getters: GetterTree<State, State> & Getters = {
|
||||
|
||||
return getUrlForLocation(state.currentMap, {x,y,z}, zoom);
|
||||
},
|
||||
|
||||
playersHeading(state: State): string {
|
||||
return state.messages.playersHeading
|
||||
.replace('{cur}', state.players.size.toString())
|
||||
.replace('{max}', state.maxPlayers.toString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user