2020-11-20 21:44:02 +00:00
|
|
|
<template>
|
2020-12-01 23:20:38 +00:00
|
|
|
<section class="sidebar__section">
|
|
|
|
<span class="section__heading">Players [{{ players.size }}/{{ maxPlayers }}]</span>
|
|
|
|
<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: {
|
|
|
|
players() {
|
|
|
|
return useStore().state.players;
|
|
|
|
},
|
|
|
|
|
|
|
|
maxPlayers(): number {
|
|
|
|
return useStore().state.configuration.maxPlayers;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
2020-11-20 21:44:02 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
</style>
|