2021-09-03 20:55:37 +00:00
|
|
|
<template>
|
|
|
|
<div class="player">
|
|
|
|
<div :class="['player__row', { 'player__row__idle': this.player.isIdle }]">
|
|
|
|
<div class="player__status">
|
|
|
|
<span v-if="gamePhase === 'select-quote'">{{ hasSelected ? '☑' : '☐' }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="player__name">
|
|
|
|
{{ player.name }}
|
|
|
|
</div>
|
|
|
|
<div class="player__score">
|
|
|
|
{{ player.score || 0 }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: ['player'],
|
|
|
|
computed: {
|
|
|
|
gamePhase() {
|
|
|
|
return this.$store.state.game.phase
|
|
|
|
},
|
|
|
|
hasSelected() {
|
|
|
|
return this.$store.state.round.selections[this.player.id]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2021-11-28 16:24:22 +00:00
|
|
|
@import '~/assets/css/components';
|
|
|
|
|
2021-09-03 20:55:37 +00:00
|
|
|
.player {
|
|
|
|
&__row {
|
|
|
|
display: flex;
|
|
|
|
color: #ffffff;
|
|
|
|
font-family: Dosis;
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
&__idle {
|
|
|
|
color: #606060;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__name {
|
|
|
|
display: inline;
|
|
|
|
flex-grow: 1;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
&__status {
|
|
|
|
width: 20px;
|
|
|
|
}
|
|
|
|
&__score {
|
|
|
|
width: 32px;
|
|
|
|
margin-left: 16px;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|