mirror of https://github.com/bra1n/townsquare.git
adding tabs to role modal and moving non edition travellers in to second tab
This commit is contained in:
parent
ea574fcc58
commit
016d7feb39
|
@ -11,7 +11,22 @@
|
||||||
: "bluffing"
|
: "bluffing"
|
||||||
}}
|
}}
|
||||||
</h3>
|
</h3>
|
||||||
<ul class="tokens">
|
<ul>
|
||||||
|
<li class="button-group">
|
||||||
|
<span
|
||||||
|
class="button"
|
||||||
|
:class="{ active: tab === 'editionRoles' }"
|
||||||
|
@click="tab = 'editionRoles'"
|
||||||
|
>Edtition Roles</span
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="button"
|
||||||
|
:class="{ active: tab === 'otherTravellers' }"
|
||||||
|
@click="tab = 'otherTravellers'"
|
||||||
|
>Other Travellers</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<ul class="tokens" v-if="tab === 'editionRoles'">
|
||||||
<li
|
<li
|
||||||
v-for="role in availableRoles"
|
v-for="role in availableRoles"
|
||||||
:class="[role.team]"
|
:class="[role.team]"
|
||||||
|
@ -20,6 +35,8 @@
|
||||||
>
|
>
|
||||||
<Token :role="role" />
|
<Token :role="role" />
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="tokens" v-if="tab === 'otherTravellers'">
|
||||||
<li
|
<li
|
||||||
v-for="role in extraTravellers"
|
v-for="role in extraTravellers"
|
||||||
:class="[role.team]"
|
:class="[role.team]"
|
||||||
|
@ -29,6 +46,7 @@
|
||||||
<Token :role="role" />
|
<Token :role="role" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</ul>
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -63,6 +81,11 @@ export default {
|
||||||
...mapState(["modals", "roles", "session"]),
|
...mapState(["modals", "roles", "session"]),
|
||||||
...mapState("players", ["players"])
|
...mapState("players", ["players"])
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tab: "editionRoles"
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setRole(role) {
|
setRole(role) {
|
||||||
if (this.playerIndex < 0) {
|
if (this.playerIndex < 0) {
|
||||||
|
@ -118,6 +141,10 @@ ul.tokens li {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.active {
|
||||||
|
background: linear-gradient(to bottom, $townsfolk 0%, rgba(0, 0, 0, 0.7) 100%);
|
||||||
|
}
|
||||||
|
|
||||||
#townsquare.spectator ul.tokens li.traveler {
|
#townsquare.spectator ul.tokens li.traveler {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue