X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FRules.vue;h=09fe2e196604ca4460b099e822ad5d591ed91faf;hb=ba65b8def2a0f3b187babaeed39fec0df55999f7;hp=d02901a0cf2a89478a4c071a4ef3b6195ad2777e;hpb=f76dd684a2738f98092cd8770146885cd423d2a9;p=vchess.git diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index d02901a0..09fe2e19 100644 --- a/client/src/views/Rules.vue +++ b/client/src/views/Rules.vue @@ -99,6 +99,10 @@ export default { else if (this.gameInProgress) this.display = "computer"; }, re_setVariant: async function(vname) { + const key = "rr_" + vname; + if (!localStorage.getItem(key)) + // Mark rules as "read" + localStorage.setItem(key, '1'); await import("@/variants/" + vname + ".js") .then((vModule) => { this.V = window.V = vModule[vname + "Rules"]; @@ -128,7 +132,7 @@ export default { this.$refs["compgame"].launchGame(); } }, - // user wants to stop the game: + // The user wants to stop the game: stopGame: function() { this.$refs["compgame"].gameOver("?", "Undetermined result"); },