From: Benjamin Auder Date: Thu, 30 Apr 2020 23:34:26 +0000 (+0200) Subject: Mark rules as read also when visiting /variants/Somevariant page X-Git-Url: https://git.auder.net/variants/Chakart/pieces/current/doc/html/left.jpg?a=commitdiff_plain;h=ba65b8def2a0f3b187babaeed39fec0df55999f7;p=vchess.git Mark rules as read also when visiting /variants/Somevariant page --- diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index d96f1edc..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"];