2020-11-20 21:44:02 +00:00
|
|
|
<template>
|
2020-12-01 23:20:38 +00:00
|
|
|
<section class="sidebar__section">
|
2020-12-11 23:01:42 +00:00
|
|
|
<span class="section__heading">{{ heading }} [{{ players.size }}/{{ maxPlayers }}]</span>
|
2020-12-01 23:20:38 +00:00
|
|
|
<ul class="section__content">
|
2020-11-23 12:13:28 +00:00
|
|
|
<PlayerListItem v-for="[account, player] in players" :key="account" :player="player"></PlayerListItem>
|
|
|
|
</ul>
|
2020-12-01 23:20:38 +00:00
|
|
|
</section>
|
2020-11-20 21:44:02 +00:00
|
|
|
</template>
|
|
|
|
|
2020-11-23 12:13:28 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import PlayerListItem from "./PlayerListItem.vue";
|
|
|
|
import {defineComponent} from "@vue/runtime-core";
|
|
|
|
import {useStore} from "@/store";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
PlayerListItem
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
2020-12-11 23:01:42 +00:00
|
|
|
heading() {
|
|
|
|
return useStore().state.messages.players;
|
|
|
|
},
|
|
|
|
|
2020-11-23 12:13:28 +00:00
|
|
|
players() {
|
|
|
|
return useStore().state.players;
|
|
|
|
},
|
|
|
|
|
|
|
|
maxPlayers(): number {
|
|
|
|
return useStore().state.configuration.maxPlayers;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
2020-11-20 21:44:02 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
</style>
|