X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FRules.vue;h=09fe2e196604ca4460b099e822ad5d591ed91faf;hb=f0d7f75fad99b004400490b5fccf20d410cd56e4;hp=367963c5784536ec400d5f24c1b0f44a8a0f5581;hpb=26d8a01a40dc198b633ae86f698b1ae82415e5e1;p=vchess.git diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index 367963c5..09fe2e19 100644 --- a/client/src/views/Rules.vue +++ b/client/src/views/Rules.vue @@ -26,7 +26,7 @@ main | {{ st.tr["Analysis mode"] }} .row .col-sm-12.col-md-8.col-md-offset-2.col-lg-6.col-lg-offset-3 - h4#variantName {{ gameInfo.vname }} + h4#variantName(v-show="display=='rules'") {{ gameInfo.vname }} div( v-show="display=='rules'" v-html="content" @@ -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"); },