main
input#modalRules.modal(type="checkbox")
div#rulesDiv(
role="dialog"
data-checkbox="modalRules"
)
.card
label.modal-close(for="modalRules")
h4#variantNameInGame(@click="gotoRules") {{ 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="participateInChat(p)"
)
| {{ 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.tooltip(
onClick="window.doClick('modalChat')"
aria-label="Chat"
)
img(src="/images/icons/chat.svg")
#actions(v-if="game.score=='*'")
button.tooltip(
@click="clickDraw()"
:class="{['draw-' + drawOffer]: true}"
:aria-label="st.tr['Draw']"
)
img(src="/images/icons/draw.svg")
button.tooltip(
v-if="!!game.mycolor"
@click="abortGame()"
:aria-label="st.tr['Abort']"
)
img(src="/images/icons/abort.svg")
button.tooltip(
v-if="!!game.mycolor"
@click="resign()"
:aria-label="st.tr['Resign']"
)
img(src="/images/icons/resign.svg")
button.tooltip(
v-else
@click="clickRematch()"
:class="{['rematch-' + rematchOffer]: true}"
:aria-label="st.tr['Rematch']"
)
img(src="/images/icons/rematch.svg")
#playersInfo
p(v-if="isLargeScreen()")
span.name(:class="{connected: isConnected(0)}")
| {{ game.players[0].name || "@nonymous" }}
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 -
span.name(:class="{connected: isConnected(1)}")
| {{ game.players[1].name || "@nonymous" }}
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] }}
p(v-else)
span.name(:class="{connected: isConnected(0)}")
| {{ game.players[0].name || "@nonymous" }}
span.split-names -
span.name(:class="{connected: isConnected(1)}")
| {{ game.players[1].name || "@nonymous" }}
br
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.separator
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] }}
BaseGame(
ref="basegame"
:game="game"
@newmove="processMove"
)