From ba65b8def2a0f3b187babaeed39fec0df55999f7 Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Fri, 1 May 2020 01:34:26 +0200 Subject: [PATCH] Mark rules as read also when visiting /variants/Somevariant page --- client/src/views/Rules.vue | 4 ++++ 1 file changed, 4 insertions(+) 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"]; -- 2.44.0