)
.card.text-center
label.modal-close(for="modalInfo")
- p(v-html="infoMessage")
+ p
+ span {{ st.tr["Rematch in progress:"] }}
+ a(
+ :href="'#/game/' + rematchId"
+ onClick="document.getElementById('modalInfo').checked=false"
+ )
+ | {{ "#/game/" + rematchId }}
input#modalChat.modal(
type="checkbox"
@click="resetChatColor()"
virtualClocks: [],
vr: null, //"variant rules" object initialized from FEN
drawOffer: "",
- infoMessage: "",
+ rematchId: "",
rematchOffer: "",
lastateAsked: false,
people: {}, //players + observers
});
urlRid += onlineSid[Math.floor(Math.random() * onlineSid.length)];
}
- this.infoMessage =
- this.st.tr["Rematch in progress:"] +
- " <a href='#/game/" +
- gameInfo.id + urlRid +
- "'>" +
- "#/game/" +
- gameInfo.id + urlRid +
- "</a>";
+ this.rematchId = gameInfo.id + urlRid;
document.getElementById("modalInfo").checked = true;
}
break;
if (!err) {
if (this.st.settings.sound)
new Audio("/sounds/newgame.flac").play().catch(() => {});
- callback();
+ if (!!callback) callback();
this.$router.push("/game/" + gameInfo.id);
}
});