projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify Grand Chess
[vchess.git]
/
client
/
src
/
views
/
Analyse.vue
diff --git
a/client/src/views/Analyse.vue
b/client/src/views/Analyse.vue
index
175cc15
..
06ef790
100644
(file)
--- a/
client/src/views/Analyse.vue
+++ b/
client/src/views/Analyse.vue
@@
-29,6
+29,7
@@
import BaseGame from "@/components/BaseGame.vue";
import { processModalClick } from "@/utils/modalClick";
import { replaceByDiag } from "@/utils/printDiagram";
import { store } from "@/store";
import { processModalClick } from "@/utils/modalClick";
import { replaceByDiag } from "@/utils/printDiagram";
import { store } from "@/store";
+import afterRawLoad from "@/utils/afterRawLoad";
export default {
name: "my-analyse",
// TODO: game import ==> require some adjustments, like
export default {
name: "my-analyse",
// TODO: game import ==> require some adjustments, like
@@
-98,19
+99,14
@@
export default {
this.alertAndQuit("Analysis disabled for this variant");
else this.loadGame(orientation);
})
this.alertAndQuit("Analysis disabled for this variant");
else this.loadGame(orientation);
})
- .catch((err) => { this.alertAndQuit("Mispelled variant name", true); });
+
//
.catch((err) => { this.alertAndQuit("Mispelled variant name", true); });
this.rulesContent =
this.rulesContent =
-
require
(
- "raw-loader!@/translations/rules/" +
-
this.gameRef.vname + "
/" +
- this.st.lang + ".pug"
+
afterRawLoad
(
+ require(
+
"raw-loader!@/translations/rules
/" +
+
this.gameRef.vname + "/" +
this.st.lang + ".pug"
).default
).default
- .replace('export default "', "")
- .replace(/";$/, "")
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ")
- .replace(/\\"/g, '"')
- .replace(/(fen:)([^:]*):/g, replaceByDiag);
+ ).replace(/(fen:)([^:]*):/g, replaceByDiag);
},
loadGame: function(orientation) {
this.game.vname = this.gameRef.vname;
},
loadGame: function(orientation) {
this.game.vname = this.gameRef.vname;