projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update npm packages
[vchess.git]
/
client
/
src
/
views
/
Rules.vue
diff --git
a/client/src/views/Rules.vue
b/client/src/views/Rules.vue
index
d02901a
..
2871f3f
100644
(file)
--- a/
client/src/views/Rules.vue
+++ b/
client/src/views/Rules.vue
@@
-83,12
+83,12
@@
export default {
"raw-loader!@/translations/rules/" +
this.gameInfo.vname + "/" +
this.st.lang + ".pug"
"raw-loader!@/translations/rules/" +
this.gameInfo.vname + "/" +
this.st.lang + ".pug"
- )
+ ).default
+ .replace('export default "', "")
+ .replace(/";$/, "")
// Next two lines fix a weird issue after last update (2019-11)
.replace(/\\n/g, " ")
.replace(/\\"/g, '"')
// Next two lines fix a weird issue after last update (2019-11)
.replace(/\\n/g, " ")
.replace(/\\"/g, '"')
- .replace('module.exports = "', "")
- .replace(/"$/, "")
.replace(/(fen:)([^:]*):/g, replaceByDiag)
);
}
.replace(/(fen:)([^:]*):/g, replaceByDiag)
);
}
@@
-99,6
+99,10
@@
export default {
else if (this.gameInProgress) this.display = "computer";
},
re_setVariant: async function(vname) {
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"];
await import("@/variants/" + vname + ".js")
.then((vModule) => {
this.V = window.V = vModule[vname + "Rules"];
@@
-128,7
+132,7
@@
export default {
this.$refs["compgame"].launchGame();
}
},
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");
},
stopGame: function() {
this.$refs["compgame"].gameOver("?", "Undetermined result");
},