mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
Fix linter issues
This commit is contained in:
parent
3e859a8850
commit
c721637d90
15 changed files with 168 additions and 64 deletions
|
@ -82,9 +82,7 @@ export default {
|
||||||
return this.grimoire.background || this.edition.background || "none";
|
return this.grimoire.background || this.edition.background || "none";
|
||||||
},
|
},
|
||||||
backgroundColor: function() {
|
backgroundColor: function() {
|
||||||
return this.grimoire.isStreamerMode
|
return this.grimoire.isStreamerMode ? "#00FF00" : "transparent";
|
||||||
? "#00FF00"
|
|
||||||
: "transparent"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -36,10 +36,10 @@ div::before {
|
||||||
animation: forwards countdown calc(var(--timer) * 1s) linear;
|
animation: forwards countdown calc(var(--timer) * 1s) linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
div::after{
|
div::after {
|
||||||
position:absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
text-align:center;
|
text-align: center;
|
||||||
content: attr(data-text);
|
content: attr(data-text);
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
|
@ -57,8 +57,8 @@ div::after{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
width:0%;
|
width: 0%;
|
||||||
display:none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
gradients: [
|
gradients: [
|
||||||
["demon", "#ce0100", "#000"],
|
["demon", "#ce0100", "#000"],
|
||||||
["townsfolk", "#1f65ff", "#000"],
|
["townsfolk", "#1f65ff", "#000"],
|
||||||
["minion", "#ff6900", "#000"],
|
["minion", "#ff6900", "#000"],
|
||||||
["default", "#4E4E4E", "#000"]
|
["default", "#4E4E4E", "#000"]
|
||||||
]
|
]
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
{{ locale.intro.footerEnd }}
|
{{ locale.intro.footerEnd }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="redirect" v-if="language === 'zh-CN'" href="https://clocktower.gstonegames.com">
|
<a
|
||||||
|
class="redirect"
|
||||||
|
v-if="language === 'zh-CN'"
|
||||||
|
href="https://clocktower.gstonegames.com"
|
||||||
|
>
|
||||||
<img src="../assets/gstone.png" class="gstone" alt="" />
|
<img src="../assets/gstone.png" class="gstone" alt="" />
|
||||||
你想使用中文版魔典吗?
|
你想使用中文版魔典吗?
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -49,13 +49,21 @@
|
||||||
<!-- Grimoire -->
|
<!-- Grimoire -->
|
||||||
<li class="headline">{{ locale.menu.grimoire.title }}</li>
|
<li class="headline">{{ locale.menu.grimoire.title }}</li>
|
||||||
<li @click="toggleGrimoire" v-if="players.length">
|
<li @click="toggleGrimoire" v-if="players.length">
|
||||||
<template v-if="!grimoire.isPublic">{{ locale.menu.grimoire.hide }}</template>
|
<template v-if="!grimoire.isPublic">{{
|
||||||
<template v-if="grimoire.isPublic">{{ locale.menu.grimoire.show }}</template>
|
locale.menu.grimoire.hide
|
||||||
|
}}</template>
|
||||||
|
<template v-if="grimoire.isPublic">{{
|
||||||
|
locale.menu.grimoire.show
|
||||||
|
}}</template>
|
||||||
<em>[G]</em>
|
<em>[G]</em>
|
||||||
</li>
|
</li>
|
||||||
<li @click="toggleNight" v-if="!session.isSpectator">
|
<li @click="toggleNight" v-if="!session.isSpectator">
|
||||||
<template v-if="!grimoire.isNight">{{ locale.menu.grimoire.nightSwitch }}</template>
|
<template v-if="!grimoire.isNight">{{
|
||||||
<template v-if="grimoire.isNight">{{ locale.menu.grimoire.daySwitch }}</template>
|
locale.menu.grimoire.nightSwitch
|
||||||
|
}}</template>
|
||||||
|
<template v-if="grimoire.isNight">{{
|
||||||
|
locale.menu.grimoire.daySwitch
|
||||||
|
}}</template>
|
||||||
<em>[S]</em>
|
<em>[S]</em>
|
||||||
</li>
|
</li>
|
||||||
<li @click="toggleRinging" v-if="!session.isSpectator">
|
<li @click="toggleRinging" v-if="!session.isSpectator">
|
||||||
|
@ -141,18 +149,31 @@
|
||||||
<template v-if="tab === 'session'">
|
<template v-if="tab === 'session'">
|
||||||
<!-- Session -->
|
<!-- Session -->
|
||||||
<li class="headline" v-if="session.sessionId">
|
<li class="headline" v-if="session.sessionId">
|
||||||
{{ session.isSpectator ? locale.menu.session.title.player : locale.menu.session.title.host }}
|
{{
|
||||||
|
session.isSpectator
|
||||||
|
? locale.menu.session.title.player
|
||||||
|
: locale.menu.session.title.host
|
||||||
|
}}
|
||||||
</li>
|
</li>
|
||||||
<li class="headline" v-else>
|
<li class="headline" v-else>
|
||||||
{{ locale.menu.session.title.create }}
|
{{ locale.menu.session.title.create }}
|
||||||
</li>
|
</li>
|
||||||
<template v-if="!session.sessionId">
|
<template v-if="!session.sessionId">
|
||||||
<li @click="hostSession">{{ locale.menu.session.storyteller }}<em>[H]</em></li>
|
<li @click="hostSession">
|
||||||
<li @click="joinSession">{{ locale.menu.session.player }}<em>[J]</em></li>
|
{{ locale.menu.session.storyteller }}<em>[H]</em>
|
||||||
|
</li>
|
||||||
|
<li @click="joinSession">
|
||||||
|
{{ locale.menu.session.player }}<em>[J]</em>
|
||||||
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<li v-if="session.ping">
|
<li v-if="session.ping">
|
||||||
{{ locale.menu.session.delay }} {{ session.isSpectator ? locale.menu.session.host : locale.menu.session.players }}
|
{{ locale.menu.session.delay }}
|
||||||
|
{{
|
||||||
|
session.isSpectator
|
||||||
|
? locale.menu.session.host
|
||||||
|
: locale.menu.session.players
|
||||||
|
}}
|
||||||
<em>{{ session.ping }}ms</em>
|
<em>{{ session.ping }}ms</em>
|
||||||
</li>
|
</li>
|
||||||
<li @click="copySessionUrl">
|
<li @click="copySessionUrl">
|
||||||
|
@ -179,7 +200,9 @@
|
||||||
<template v-if="tab === 'players' && !session.isSpectator">
|
<template v-if="tab === 'players' && !session.isSpectator">
|
||||||
<!-- Users -->
|
<!-- Users -->
|
||||||
<li class="headline">{{ locale.menu.players.title }}</li>
|
<li class="headline">{{ locale.menu.players.title }}</li>
|
||||||
<li @click="addPlayer" v-if="players.length < 20">{{ locale.menu.players.add }}<em>[A]</em></li>
|
<li @click="addPlayer" v-if="players.length < 20">
|
||||||
|
{{ locale.menu.players.add }}<em>[A]</em>
|
||||||
|
</li>
|
||||||
<li @click="randomizeSeatings" v-if="players.length > 2">
|
<li @click="randomizeSeatings" v-if="players.length > 2">
|
||||||
{{ locale.menu.players.randomize }}
|
{{ locale.menu.players.randomize }}
|
||||||
<em><font-awesome-icon icon="dice"/></em>
|
<em><font-awesome-icon icon="dice"/></em>
|
||||||
|
@ -318,9 +341,7 @@ export default {
|
||||||
},
|
},
|
||||||
joinSession() {
|
joinSession() {
|
||||||
if (this.session.sessionId) return this.leaveSession();
|
if (this.session.sessionId) return this.leaveSession();
|
||||||
let sessionId = prompt(
|
let sessionId = prompt(this.locale.prompt.joinSession);
|
||||||
this.locale.prompt.joinSession
|
|
||||||
);
|
|
||||||
if (sessionId.match(/^https?:\/\//i)) {
|
if (sessionId.match(/^https?:\/\//i)) {
|
||||||
sessionId = sessionId.split("#").pop();
|
sessionId = sessionId.split("#").pop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,28 +45,44 @@
|
||||||
<!-- Overlay icons -->
|
<!-- Overlay icons -->
|
||||||
<div class="overlay">
|
<div class="overlay">
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
v-if="!grimoire.isOrganVoteMode || !session.isSpectator || player.id==session.playerId"
|
v-if="
|
||||||
|
!grimoire.isOrganVoteMode ||
|
||||||
|
!session.isSpectator ||
|
||||||
|
player.id == session.playerId
|
||||||
|
"
|
||||||
icon="hand-paper"
|
icon="hand-paper"
|
||||||
class="vote"
|
class="vote"
|
||||||
:title="locale.player.handUp"
|
:title="locale.player.handUp"
|
||||||
@click="vote()"
|
@click="vote()"
|
||||||
/>
|
/>
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
v-if="grimoire.isOrganVoteMode && session.isSpectator && player.id!==session.playerId"
|
v-if="
|
||||||
|
grimoire.isOrganVoteMode &&
|
||||||
|
session.isSpectator &&
|
||||||
|
player.id !== session.playerId
|
||||||
|
"
|
||||||
icon="question"
|
icon="question"
|
||||||
class="vote"
|
class="vote"
|
||||||
:title="locale.player.handUp"
|
:title="locale.player.handUp"
|
||||||
@click="vote()"
|
@click="vote()"
|
||||||
/>
|
/>
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
v-if="!grimoire.isOrganVoteMode || !session.isSpectator || player.id==session.playerId"
|
v-if="
|
||||||
|
!grimoire.isOrganVoteMode ||
|
||||||
|
!session.isSpectator ||
|
||||||
|
player.id == session.playerId
|
||||||
|
"
|
||||||
icon="times"
|
icon="times"
|
||||||
class="vote"
|
class="vote"
|
||||||
:title="locale.player.handDown"
|
:title="locale.player.handDown"
|
||||||
@click="vote()"
|
@click="vote()"
|
||||||
/>
|
/>
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
v-if="grimoire.isOrganVoteMode && session.isSpectator && player.id!==session.playerId"
|
v-if="
|
||||||
|
grimoire.isOrganVoteMode &&
|
||||||
|
session.isSpectator &&
|
||||||
|
player.id !== session.playerId
|
||||||
|
"
|
||||||
icon="question"
|
icon="question"
|
||||||
class="vote"
|
class="vote"
|
||||||
:title="locale.player.handDown"
|
:title="locale.player.handDown"
|
||||||
|
@ -140,11 +156,15 @@
|
||||||
(session.isSpectator && player.id === session.playerId)
|
(session.isSpectator && player.id === session.playerId)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<font-awesome-icon icon="venus-mars" />{{ locale.player.changePronouns }}
|
<font-awesome-icon icon="venus-mars" />{{
|
||||||
|
locale.player.changePronouns
|
||||||
|
}}
|
||||||
</li>
|
</li>
|
||||||
<template v-if="!session.isSpectator">
|
<template v-if="!session.isSpectator">
|
||||||
<li @click="changeName">
|
<li @click="changeName">
|
||||||
<font-awesome-icon icon="user-edit" />{{ locale.player.changeName }}
|
<font-awesome-icon icon="user-edit" />{{
|
||||||
|
locale.player.changeName
|
||||||
|
}}
|
||||||
</li>
|
</li>
|
||||||
<li @click="movePlayer()" :class="{ disabled: session.lockedVote }">
|
<li @click="movePlayer()" :class="{ disabled: session.lockedVote }">
|
||||||
<font-awesome-icon icon="redo-alt" />
|
<font-awesome-icon icon="redo-alt" />
|
||||||
|
@ -591,7 +611,10 @@ export default {
|
||||||
#townsquare.vote .player.vote-lock:not(.vote-yes) .overlay svg.vote.fa-times,
|
#townsquare.vote .player.vote-lock:not(.vote-yes) .overlay svg.vote.fa-times,
|
||||||
#townsquare.vote .player.you.vote-yes .overlay svg.vote.fa-question,
|
#townsquare.vote .player.you.vote-yes .overlay svg.vote.fa-question,
|
||||||
#townsquare.vote .player.vote-lock.vote-yes .overlay svg.vote.fa-question,
|
#townsquare.vote .player.vote-lock.vote-yes .overlay svg.vote.fa-question,
|
||||||
#townsquare.vote .player.vote-lock:not(.vote-yes) .overlay svg.vote.fa-question {
|
#townsquare.vote
|
||||||
|
.player.vote-lock:not(.vote-yes)
|
||||||
|
.overlay
|
||||||
|
svg.vote.fa-question {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,18 +82,42 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group" v-if="session.nomination">
|
<div class="button-group" v-if="session.nomination">
|
||||||
<div @click="setAccusationTimer()" class="button">{{ locale.townsquare.timer.accusation.button }}</div>
|
<div @click="setAccusationTimer()" class="button">
|
||||||
<div @click="setDefenseTimer()" class="button">{{ locale.townsquare.timer.defense.button }}</div>
|
{{ locale.townsquare.timer.accusation.button }}
|
||||||
<div @click="setDebateTimer()" class="button">{{ locale.townsquare.timer.debate.button }}</div>
|
</div>
|
||||||
|
<div @click="setDefenseTimer()" class="button">
|
||||||
|
{{ locale.townsquare.timer.defense.button }}
|
||||||
|
</div>
|
||||||
|
<div @click="setDebateTimer()" class="button">
|
||||||
|
{{ locale.townsquare.timer.debate.button }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group" v-else>
|
<div class="button-group" v-else>
|
||||||
<div @click="setDaytimeTimer()" class="button">{{ locale.townsquare.timer.daytime.button }}</div>
|
<div @click="setDaytimeTimer()" class="button">
|
||||||
<div @click="setNominationTimer()" class="button">{{ locale.townsquare.timer.nominations.button }}</div>
|
{{ locale.townsquare.timer.daytime.button }}
|
||||||
<div @click="setDuskTimer()" class="button">{{ locale.townsquare.timer.dusk.button }}</div>
|
</div>
|
||||||
|
<div @click="setNominationTimer()" class="button">
|
||||||
|
{{ locale.townsquare.timer.nominations.button }}
|
||||||
|
</div>
|
||||||
|
<div @click="setDuskTimer()" class="button">
|
||||||
|
{{ locale.townsquare.timer.dusk.button }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<div @click="toggleNight()" class="button" :class="{disabled: grimoire.isNight}">☀</div>
|
<div
|
||||||
<div @click="toggleNight()" class="button" :class="{disabled: !grimoire.isNight}">☽</div>
|
@click="toggleNight()"
|
||||||
|
class="button"
|
||||||
|
:class="{ disabled: grimoire.isNight }"
|
||||||
|
>
|
||||||
|
☀
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
@click="toggleNight()"
|
||||||
|
class="button"
|
||||||
|
:class="{ disabled: !grimoire.isNight }"
|
||||||
|
>
|
||||||
|
☽
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<div @click="toggleRinging()" class="button">
|
<div @click="toggleRinging()" class="button">
|
||||||
|
@ -327,7 +351,10 @@ export default {
|
||||||
this.nominate = -1;
|
this.nominate = -1;
|
||||||
},
|
},
|
||||||
renameTimer() {
|
renameTimer() {
|
||||||
let newName = prompt(this.locale.townsquare.timer.prompt.name, this.timerName);
|
let newName = prompt(
|
||||||
|
this.locale.townsquare.timer.prompt.name,
|
||||||
|
this.timerName
|
||||||
|
);
|
||||||
if (newName === "") {
|
if (newName === "") {
|
||||||
newName = this.locale.townsquare.timer.default.text;
|
newName = this.locale.townsquare.timer.default.text;
|
||||||
}
|
}
|
||||||
|
@ -348,19 +375,26 @@ export default {
|
||||||
setAccusationTimer() {
|
setAccusationTimer() {
|
||||||
this.timerDuration = 1;
|
this.timerDuration = 1;
|
||||||
let timerText = this.locale.townsquare.timer.accusation.text;
|
let timerText = this.locale.townsquare.timer.accusation.text;
|
||||||
timerText = timerText.replace("$accusator", this.players[this.session.nomination[0]].name).replace("$accusee", this.players[this.session.nomination[1]].name);
|
timerText = timerText
|
||||||
|
.replace("$accusator", this.players[this.session.nomination[0]].name)
|
||||||
|
.replace("$accusee", this.players[this.session.nomination[1]].name);
|
||||||
this.timerName = timerText;
|
this.timerName = timerText;
|
||||||
},
|
},
|
||||||
setDefenseTimer() {
|
setDefenseTimer() {
|
||||||
this.timerDuration = 1;
|
this.timerDuration = 1;
|
||||||
let timerText = this.locale.townsquare.timer.defense.text;
|
let timerText = this.locale.townsquare.timer.defense.text;
|
||||||
timerText = timerText.replace("$accusee", this.players[this.session.nomination[1]].name).replace("$accusator", this.players[this.session.nomination[0]].name);
|
timerText = timerText
|
||||||
|
.replace("$accusee", this.players[this.session.nomination[1]].name)
|
||||||
|
.replace("$accusator", this.players[this.session.nomination[0]].name);
|
||||||
this.timerName = timerText;
|
this.timerName = timerText;
|
||||||
},
|
},
|
||||||
setDebateTimer() {
|
setDebateTimer() {
|
||||||
this.timerDuration = 2;
|
this.timerDuration = 2;
|
||||||
let timerText = this.locale.townsquare.timer.debate.text;
|
let timerText = this.locale.townsquare.timer.debate.text;
|
||||||
timerText = timerText.replace("$accusee", this.players[this.session.nomination[1]].name);
|
timerText = timerText.replace(
|
||||||
|
"$accusee",
|
||||||
|
this.players[this.session.nomination[1]].name
|
||||||
|
);
|
||||||
this.timerName = timerText;
|
this.timerName = timerText;
|
||||||
},
|
},
|
||||||
setTimer() {
|
setTimer() {
|
||||||
|
@ -538,7 +572,7 @@ export default {
|
||||||
&.fabled {
|
&.fabled {
|
||||||
top: 10px;
|
top: 10px;
|
||||||
}
|
}
|
||||||
&.storytelling{
|
&.storytelling {
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
left: auto;
|
left: auto;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
|
|
|
@ -10,12 +10,17 @@
|
||||||
<em>{{ nominee.name }}</em
|
<em>{{ nominee.name }}</em
|
||||||
>!
|
>!
|
||||||
<br />
|
<br />
|
||||||
<em class="blue" v-if="!grimoire.isOrganVoteMode || nominee.role.team == 'traveler' || !session.isSpectator">
|
<em
|
||||||
|
class="blue"
|
||||||
|
v-if="
|
||||||
|
!grimoire.isOrganVoteMode ||
|
||||||
|
nominee.role.team == 'traveler' ||
|
||||||
|
!session.isSpectator
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ voters.length }} {{ locale.vote.votes }}
|
{{ voters.length }} {{ locale.vote.votes }}
|
||||||
</em>
|
</em>
|
||||||
<em class="blue" v-else>
|
<em class="blue" v-else> ? {{ locale.vote.votes }} </em>
|
||||||
? {{ locale.vote.votes }}
|
|
||||||
</em>
|
|
||||||
{{ locale.vote.inFavor }}
|
{{ locale.vote.inFavor }}
|
||||||
<em v-if="nominee.role.team !== 'traveler'">
|
<em v-if="nominee.role.team !== 'traveler'">
|
||||||
({{ locale.vote.majorityIs }} {{ Math.ceil(alive / 2) }})
|
({{ locale.vote.majorityIs }} {{ Math.ceil(alive / 2) }})
|
||||||
|
@ -58,7 +63,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="button" @click="stop">{{ locale.vote.reset }}</div>
|
<div class="button" @click="stop">{{ locale.vote.reset }}</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="button demon" @click="finish">{{ locale.vote.close }}</div>
|
<div class="button demon" @click="finish">
|
||||||
|
{{ locale.vote.close }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group mark" v-if="nominee.role.team !== 'traveler'">
|
<div class="button-group mark" v-if="nominee.role.team !== 'traveler'">
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
<div class="custom" v-else>
|
<div class="custom" v-else>
|
||||||
<h3>{{ locale.modal.edition.custom.title }}</h3>
|
<h3>{{ locale.modal.edition.custom.title }}</h3>
|
||||||
{{ locale.modal.edition.custom.introStart }}
|
{{ locale.modal.edition.custom.introStart }}
|
||||||
<a href="https://script.bloodontheclocktower.com/" target="_blank"
|
<a href="https://script.bloodontheclocktower.com/" target="_blank">{{
|
||||||
>{{ locale.modal.edition.custom.scriptTool }}</a
|
locale.modal.edition.custom.scriptTool
|
||||||
>
|
}}</a>
|
||||||
{{ locale.modal.edition.custom.introEnd }}.<br />
|
{{ locale.modal.edition.custom.introEnd }}.<br />
|
||||||
<br />
|
<br />
|
||||||
{{ locale.modal.edition.custom.instructionsStart }}
|
{{ locale.modal.edition.custom.instructionsStart }}
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>{{ locale.modal.edition.custom.documentation }}n</a
|
>{{ locale.modal.edition.custom.documentation }}n</a
|
||||||
>
|
>
|
||||||
{{ locale.modal.edition.custom.instructionsEnd }}<br/>
|
{{ locale.modal.edition.custom.instructionsEnd }}<br />
|
||||||
<b>{{ locale.modal.edition.custom.warning }}</b>
|
<b>{{ locale.modal.edition.custom.warning }}</b>
|
||||||
<h3>{{ locale.modal.edition.popularScripts }}</h3>
|
<h3>{{ locale.modal.edition.popularScripts }}</h3>
|
||||||
<ul class="scripts">
|
<ul class="scripts">
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
width:90vw;
|
width: 90vw;
|
||||||
max-width: 1800px;
|
max-width: 1800px;
|
||||||
|
|
||||||
.editions &,
|
.editions &,
|
||||||
|
|
|
@ -118,7 +118,8 @@ export default {
|
||||||
firstNight: 5,
|
firstNight: 5,
|
||||||
team: "minion",
|
team: "minion",
|
||||||
players: this.players.filter(p => p.role.team === "minion"),
|
players: this.players.filter(p => p.role.team === "minion"),
|
||||||
firstNightReminder: this.locale.modal.nightOrder.minionInfoDescription
|
firstNightReminder: this.locale.modal.nightOrder
|
||||||
|
.minionInfoDescription
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "evil",
|
id: "evil",
|
||||||
|
@ -126,7 +127,8 @@ export default {
|
||||||
firstNight: 8,
|
firstNight: 8,
|
||||||
team: "demon",
|
team: "demon",
|
||||||
players: this.players.filter(p => p.role.team === "demon"),
|
players: this.players.filter(p => p.role.team === "demon"),
|
||||||
firstNightReminder: this.locale.modal.nightOrder.demonInfoDescription
|
firstNightReminder: this.locale.modal.nightOrder
|
||||||
|
.demonInfoDescription
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,10 @@ export default {
|
||||||
|
|
||||||
reminders.push({ role: "good", name: this.locale.modal.reminder.good });
|
reminders.push({ role: "good", name: this.locale.modal.reminder.good });
|
||||||
reminders.push({ role: "evil", name: this.locale.modal.reminder.evil });
|
reminders.push({ role: "evil", name: this.locale.modal.reminder.evil });
|
||||||
reminders.push({ role: "custom", name: this.locale.modal.reminder.custom });
|
reminders.push({
|
||||||
|
role: "custom",
|
||||||
|
name: this.locale.modal.reminder.custom
|
||||||
|
});
|
||||||
return reminders;
|
return reminders;
|
||||||
},
|
},
|
||||||
...mapState(["modals", "grimoire", "locale"]),
|
...mapState(["modals", "grimoire", "locale"]),
|
||||||
|
|
|
@ -73,12 +73,20 @@
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="[
|
:icon="[
|
||||||
'fas',
|
'fas',
|
||||||
vote.votes == null ? 'minus-square' : ( vote.votes.length >= vote.majority ? 'check-square' : 'square' )
|
vote.votes == null
|
||||||
|
? 'minus-square'
|
||||||
|
: vote.votes.length >= vote.majority
|
||||||
|
? 'check-square'
|
||||||
|
: 'square'
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ vote.votes == null ? locale.modal.voteHistory.hiddenVote : vote.votes.join(", ") }}
|
{{
|
||||||
|
vote.votes == null
|
||||||
|
? locale.modal.voteHistory.hiddenVote
|
||||||
|
: vote.votes.join(", ")
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import gameInfo from '../index.js';
|
import gameInfo from "../index.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a vote request.
|
* Handle a vote request.
|
||||||
|
@ -86,14 +86,18 @@ const mutations = {
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
nominator: players[state.nomination[0]].name,
|
nominator: players[state.nomination[0]].name,
|
||||||
nominee: players[state.nomination[1]].name,
|
nominee: players[state.nomination[1]].name,
|
||||||
type: isExile ? "Exile" : ("Execution" + ((organGrinder && !state.isSpectator) ? "*" : "")),
|
type: isExile
|
||||||
|
? "Exile"
|
||||||
|
: "Execution" + (organGrinder && !state.isSpectator ? "*" : ""),
|
||||||
majority: Math.ceil(
|
majority: Math.ceil(
|
||||||
players.filter(player => !player.isDead || isExile).length / 2
|
players.filter(player => !player.isDead || isExile).length / 2
|
||||||
),
|
),
|
||||||
votes: organGrinder && state.isSpectator ? null :
|
votes:
|
||||||
players
|
organGrinder && state.isSpectator
|
||||||
.filter((player, index) => state.votes[index])
|
? null
|
||||||
.map(({ name }) => name)
|
: players
|
||||||
|
.filter((player, index) => state.votes[index])
|
||||||
|
.map(({ name }) => name)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
clearVoteHistory(state) {
|
clearVoteHistory(state) {
|
||||||
|
|
|
@ -731,7 +731,7 @@ class LiveSession {
|
||||||
if (this._isSpectator) return;
|
if (this._isSpectator) return;
|
||||||
this._send("isRinging", this._store.state.grimoire.isRinging);
|
this._send("isRinging", this._store.state.grimoire.isRinging);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send the isOrganVoteMode status. ST only
|
* Send the isOrganVoteMode status. ST only
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue