main
input#modalRules.modal(type="checkbox")
div#rulesDiv(
role="dialog"
data-checkbox="modalRules"
)
.card
label.modal-close(for="modalRules")
a#variantNameInGame(:href="'/#/variants/'+game.vname") {{ game.vname }}
div(v-html="rulesContent")
input#modalScore.modal(type="checkbox")
div#scoreDiv(
role="dialog"
data-checkbox="modalScore"
)
.card.text-center
label.modal-close(for="modalScore")
p.score-section
span.score {{ game.score }}
| :
span.score-msg {{ st.tr[game.scoreMsg] }}
input#modalRematch.modal(type="checkbox")
div#rematchDiv(
role="dialog"
data-checkbox="modalRematch"
)
.card.text-center
label.modal-close(for="modalRematch")
a(
:href="'#/game/' + rematchId"
onClick="document.getElementById('modalRematch').checked=false"
)
| {{ st.tr["Rematch in progress"] }}
input#modalChat.modal(
type="checkbox"
@click="toggleChat()"
)
div#chatWrap(
role="dialog"
data-checkbox="modalChat"
)
.card
label.modal-close(for="modalChat")
#participants
span {{ st.tr["Participant(s):"] }}
span(
v-for="p in Object.values(people)"
v-if="!!p.name"
)
| {{ p.name }}
span.anonymous(v-if="someAnonymousPresent()") + @nonymous
Chat(
ref="chatcomp"
:players="game.players"
:pastChats="game.chats"
@mychat="processChat"
@chatcleared="clearChat"
)
input#modalConfirm.modal(type="checkbox")
div#confirmDiv(role="dialog")
.card
.diagram(
v-if="!!vr && ['all','byrow'].includes(vr.showMoves)"
v-html="curDiag"
)
p.text-center(v-else)
span {{ st.tr["Move played:"] + " " }}
span.bold {{ moveNotation }}
br
span {{ st.tr["Are you sure?"] }}
.button-group#buttonsConfirm
// onClick for acceptBtn: set dynamically
button.acceptBtn
span {{ st.tr["Validate"] }}
button.refuseBtn(@click="cancelMove()")
span {{ st.tr["Cancel"] }}
.row
#aboveBoard.col-sm-12
span.variant-cadence(v-if="game.type!='import'") {{ game.cadence }}
span.variant-name {{ game.vname }}
span#nextGame(
v-if="nextIds.length > 0"
@click="showNextGame()"
)
| {{ st.tr["Next_g"] }}
button#chatBtn(
:class="btnTooltipClass()"
onClick="window.doClick('modalChat')"
aria-label="Chat"
)
img(src="/images/icons/chat.svg")
#actions(v-if="game.score=='*'")
button(
@click="clickDraw()"
:class="btnTooltipClass('draw')"
:aria-label="st.tr['Draw']"
)
img(src="/images/icons/draw.svg")
button(
v-if="!!game.mycolor"
:class="btnTooltipClass()"
@click="abortGame()"
:aria-label="st.tr['Abort']"
)
img(src="/images/icons/abort.svg")
button(
v-if="!!game.mycolor"
:class="btnTooltipClass()"
@click="resign()"
:aria-label="st.tr['Resign']"
)
img(src="/images/icons/resign.svg")
button(
v-else
:class="btnTooltipClass('rematch')"
@click="clickRematch()"
:aria-label="st.tr['Rematch']"
)
img(src="/images/icons/rematch.svg")
#playersInfo
div(v-if="isLargeScreen()")
UserBio.user-bio(
:class="{connected: isConnected(0)}"
:uid="game.players[0].id"
:uname="game.players[0].name"
)
span.time(
v-if="game.score=='*'"
:class="{yourturn: !!vr && vr.turn == 'w'}"
)
span.time-left {{ virtualClocks[0][0] }}
span.time-separator(v-if="!!virtualClocks[0][1]") :
span.time-right(v-if="!!virtualClocks[0][1]")
| {{ virtualClocks[0][1] }}
span.split-names -
UserBio.user-bio(
:class="{connected: isConnected(1)}"
:uid="game.players[1].id"
:uname="game.players[1].name"
)
span.time(
v-if="game.score=='*'"
:class="{yourturn: !!vr && vr.turn == 'b'}"
)
span.time-left {{ virtualClocks[1][0] }}
span.time-separator(v-if="!!virtualClocks[1][1]") :
span.time-right(v-if="!!virtualClocks[1][1]")
| {{ virtualClocks[1][1] }}
div(v-else)
UserBio.user-bio(
:class="{connected: isConnected(0)}"
:uid="game.players[0].id"
:uname="game.players[0].name"
)
span.split-names -
UserBio.user-bio(
:class="{connected: isConnected(1)}"
:uid="game.players[1].id"
:uname="game.players[1].name"
)
div(v-if="game.score=='*'")
span.time(:class="{yourturn: !!vr && vr.turn == 'w'}")
span.time-left {{ virtualClocks[0][0] }}
span.time-separator(v-if="!!virtualClocks[0][1]") :
span.time-right(v-if="!!virtualClocks[0][1]")
| {{ virtualClocks[0][1] }}
span.separator
span.time(:class="{yourturn: !!vr && vr.turn == 'b'}")
span.time-left {{ virtualClocks[1][0] }}
span.time-separator(v-if="!!virtualClocks[1][1]") :
span.time-right(v-if="!!virtualClocks[1][1]")
| {{ virtualClocks[1][1] }}
BaseGame(
ref="basegame"
:game="game"
@newmove="processMove"
)