2020-04-05 20:54:15 +00:00
|
|
|
<template>
|
|
|
|
<ul class="info">
|
2020-04-10 09:37:06 +00:00
|
|
|
<li class="edition" v-bind:class="['edition-' + edition]"></li>
|
2020-04-28 19:47:28 +00:00
|
|
|
<li v-if="players.length - teams.traveler < 5">
|
|
|
|
Please add more players!
|
|
|
|
</li>
|
2020-04-05 20:54:15 +00:00
|
|
|
<li>
|
|
|
|
{{ players.length }} <font-awesome-icon class="players" icon="users" />
|
|
|
|
{{ teams.alive }} <font-awesome-icon class="alive" icon="heartbeat" />
|
|
|
|
{{ teams.votes }} <font-awesome-icon class="votes" icon="vote-yea" />
|
|
|
|
</li>
|
2020-04-11 20:55:37 +00:00
|
|
|
<li v-if="players.length - teams.traveler >= 5">
|
2020-04-05 20:54:15 +00:00
|
|
|
{{ teams.townsfolk }}
|
|
|
|
<font-awesome-icon class="townsfolk" icon="user-friends" />
|
2020-04-11 20:55:37 +00:00
|
|
|
{{ teams.outsider }}
|
2020-04-05 20:54:15 +00:00
|
|
|
<font-awesome-icon
|
|
|
|
class="outsider"
|
2020-04-11 20:55:37 +00:00
|
|
|
v-bind:icon="teams.outsider > 1 ? 'user-friends' : 'user'"
|
2020-04-05 20:54:15 +00:00
|
|
|
/>
|
2020-04-11 20:55:37 +00:00
|
|
|
{{ teams.minion }}
|
2020-04-05 20:54:15 +00:00
|
|
|
<font-awesome-icon
|
|
|
|
class="minion"
|
2020-04-11 20:55:37 +00:00
|
|
|
v-bind:icon="teams.minion > 1 ? 'user-friends' : 'user'"
|
2020-04-05 20:54:15 +00:00
|
|
|
/>
|
2020-04-11 20:55:37 +00:00
|
|
|
{{ teams.demon }}
|
2020-04-05 20:54:15 +00:00
|
|
|
<font-awesome-icon
|
|
|
|
class="demon"
|
2020-04-11 20:55:37 +00:00
|
|
|
v-bind:icon="teams.demon > 1 ? 'user-friends' : 'user'"
|
2020-04-05 20:54:15 +00:00
|
|
|
/>
|
2020-04-11 20:55:37 +00:00
|
|
|
<template v-if="teams.traveler">
|
|
|
|
{{ teams.traveler }}
|
2020-04-05 20:54:15 +00:00
|
|
|
<font-awesome-icon
|
2020-04-10 15:48:20 +00:00
|
|
|
class="traveler"
|
2020-04-11 20:55:37 +00:00
|
|
|
v-bind:icon="teams.traveler > 1 ? 'user-friends' : 'user'"
|
2020-04-05 20:54:15 +00:00
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import gameJSON from "./../game";
|
2020-05-02 19:33:44 +00:00
|
|
|
import { mapState } from "vuex";
|
2020-04-05 20:54:15 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
computed: {
|
|
|
|
teams: function() {
|
2020-05-03 21:05:17 +00:00
|
|
|
const { players } = this.$store.state.players;
|
|
|
|
const nonTravelers = this.$store.getters["players/nonTravelers"];
|
2020-05-09 19:47:00 +00:00
|
|
|
const alive = players.filter(player => player.isDead !== true).length;
|
2020-04-05 20:54:15 +00:00
|
|
|
return {
|
2020-05-03 21:05:17 +00:00
|
|
|
...gameJSON[nonTravelers - 5],
|
|
|
|
traveler: players.length - nonTravelers,
|
2020-04-05 20:54:15 +00:00
|
|
|
alive,
|
|
|
|
votes:
|
|
|
|
alive +
|
2020-05-03 21:05:17 +00:00
|
|
|
players.filter(
|
2020-05-09 19:47:00 +00:00
|
|
|
player => player.isDead === true && player.isVoteless !== true
|
2020-04-05 20:54:15 +00:00
|
|
|
).length
|
|
|
|
};
|
2020-05-02 19:33:44 +00:00
|
|
|
},
|
2020-05-31 21:42:08 +00:00
|
|
|
...mapState(["edition"]),
|
|
|
|
...mapState("players", ["players"])
|
2020-04-05 20:54:15 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2020-05-31 21:42:08 +00:00
|
|
|
<style lang="scss" scoped>
|
2020-04-05 20:54:15 +00:00
|
|
|
@import "../vars.scss";
|
|
|
|
|
2020-05-02 19:33:44 +00:00
|
|
|
// Editions
|
|
|
|
@each $img, $skipIcons in $editions {
|
|
|
|
.edition-#{$img} {
|
|
|
|
background-image: url("../assets/editions/#{$img}.png");
|
|
|
|
}
|
|
|
|
@if $skipIcons != true {
|
|
|
|
.edition-#{$img}.townsfolk {
|
|
|
|
background-image: url("../assets/editions/#{$img}-townsfolk.png");
|
|
|
|
}
|
|
|
|
.edition-#{$img}.outsider {
|
|
|
|
background-image: url("../assets/editions/#{$img}-outsider.png");
|
|
|
|
}
|
|
|
|
.edition-#{$img}.minion {
|
|
|
|
background-image: url("../assets/editions/#{$img}-minion.png");
|
|
|
|
}
|
|
|
|
.edition-#{$img}.demon {
|
|
|
|
background-image: url("../assets/editions/#{$img}-demon.png");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-05 20:54:15 +00:00
|
|
|
.info {
|
|
|
|
position: absolute;
|
|
|
|
display: flex;
|
|
|
|
width: 20%;
|
|
|
|
height: 20%;
|
2020-04-10 09:21:27 +00:00
|
|
|
padding: 50px 0 0;
|
2020-04-05 20:54:15 +00:00
|
|
|
align-items: center;
|
|
|
|
align-content: center;
|
|
|
|
justify-content: center;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
background: url("../assets/demon-head.png") center center no-repeat;
|
|
|
|
background-size: auto 100%;
|
|
|
|
|
|
|
|
li {
|
|
|
|
display: block;
|
|
|
|
white-space: nowrap;
|
|
|
|
font-weight: bold;
|
|
|
|
text-align: center;
|
|
|
|
padding: 0 5px;
|
|
|
|
width: 100%;
|
|
|
|
filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
|
|
|
|
|
|
|
|
svg {
|
|
|
|
margin-right: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.players {
|
|
|
|
color: #00f700;
|
|
|
|
}
|
|
|
|
.alive {
|
|
|
|
color: #ff4a50;
|
|
|
|
}
|
|
|
|
.votes {
|
2020-05-05 18:51:40 +00:00
|
|
|
color: #fff;
|
2020-04-05 20:54:15 +00:00
|
|
|
}
|
|
|
|
.townsfolk {
|
|
|
|
color: $townsfolk;
|
|
|
|
}
|
|
|
|
.outsider {
|
|
|
|
color: $outsider;
|
|
|
|
}
|
|
|
|
.minion {
|
|
|
|
color: $minion;
|
|
|
|
}
|
|
|
|
.demon {
|
|
|
|
color: $demon;
|
|
|
|
}
|
2020-04-10 15:48:20 +00:00
|
|
|
.traveler {
|
|
|
|
color: $traveler;
|
2020-04-05 20:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
2020-04-10 08:59:32 +00:00
|
|
|
|
2020-04-10 09:37:06 +00:00
|
|
|
li.edition {
|
2020-04-10 08:59:32 +00:00
|
|
|
width: 220px;
|
|
|
|
height: 200px;
|
2020-04-10 15:48:20 +00:00
|
|
|
background-position: 0 center;
|
|
|
|
background-repeat: no-repeat;
|
2020-04-10 08:59:32 +00:00
|
|
|
background-size: 100% auto;
|
|
|
|
position: absolute;
|
|
|
|
top: -50px;
|
|
|
|
}
|
2020-04-05 20:54:15 +00:00
|
|
|
}
|
|
|
|
</style>
|