LiveAtlas/src/components/PlayerList.vue

36 lines
829 B
Vue
Raw Normal View History

2020-11-20 21:44:02 +00:00
<template>
2020-11-23 12:13:28 +00:00
<fieldset class="section">
<legend>Players [{{ players.size }}/{{ maxPlayers }}]</legend>
<!-- <div class="scrollup" style="display: block;"></div>-->
<ul class="list content playerlist">
<PlayerListItem v-for="[account, player] in players" :key="account" :player="player"></PlayerListItem>
</ul>
<!-- <div class="scrolldown" style="display: block;"></div>-->
</fieldset>
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>