X-Git-Url: https://git.auder.net/img/rock_paper_scissors_lizard_spock.gif?a=blobdiff_plain;f=client%2Fsrc%2Fmain.js;h=6547865a567cbed9ff750ecf5c784ecb44ff7a7c;hb=4edfed6c011cd97d58d5bd8e0451cc0c1006a0a0;hp=97bad75490199daa171a6a6ac6c94fe730740505;hpb=5b020e732156ee77d3b15b127aef2df57c2562ad;p=vchess.git diff --git a/client/src/main.js b/client/src/main.js index 97bad754..6547865a 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -20,6 +20,7 @@ new Vue({ // }, created: function() { window.doClick = (elemId) => { document.getElementById(elemId).click() }; + store.initialize(); // TODO: AJAX call get corr games (all variants) // si dernier lastMove sur serveur n'est pas le mien et nextColor == moi, alors background orange @@ -34,22 +35,8 @@ new Vue({ // if (!!localStorage["variant"]) // location.hash = "#game?id=" + localStorage["gameId"]; }, - // Later, for icons (if using feather): -// mounted: function() { -// feather.replace(); -// }, - mounted: function() { - store.initialize(); - }, }).$mount("#app"); -// TODO: get rules, dynamic import -// Load a rules page (AJAX) -// router.get("/rules/:vname([a-zA-Z0-9]+)", access.ajax, (req,res) => { -// const lang = selectLanguage(req, res); -// res.render("rules/" + req.params["vname"] + "/" + lang); -// }); -// // board2, 3, 4 automatiquement, mais rules separement (les 3 pour une) // game : aussi systématique // problems: on-demand