fixing bug where a script that includes all travellers leaves the other travellers tab empty, the tabs now check if there is any other travelers before displaying the tabs.

This commit is contained in:
Dave 2021-01-25 16:09:53 +00:00
parent db8f23a572
commit bddd1f94bd
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
: "bluffing" : "bluffing"
}} }}
</h3> </h3>
<ul class="tokens" v-if="tab === 'editionRoles'"> <ul class="tokens" v-if="tab === 'editionRoles' || !otherTravelers.size">
<li <li
v-for="role in availableRoles" v-for="role in availableRoles"
:class="[role.team]" :class="[role.team]"
@ -18,7 +18,7 @@
<Token :role="role" /> <Token :role="role" />
</li> </li>
</ul> </ul>
<ul class="tokens" v-if="tab === 'otherTravelers'"> <ul class="tokens" v-if="tab === 'otherTravelers' && otherTravelers.size">
<li <li
v-for="role in otherTravelers.values()" v-for="role in otherTravelers.values()"
:class="[role.team]" :class="[role.team]"
@ -28,7 +28,7 @@
<Token :role="role" /> <Token :role="role" />
</li> </li>
</ul> </ul>
<div class="button-group" v-if="playerIndex >= 0"> <div class="button-group" v-if="playerIndex >= 0 && otherTravelers.size">
<span <span
class="button" class="button"
:class="{ townsfolk: tab === 'editionRoles' }" :class="{ townsfolk: tab === 'editionRoles' }"