X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Findex.js;h=64489262663e9237bd420d3ebeb5ece157830537;hp=13004f0edb5b21ac1273aa55fde4d5d9b9bf14de;hb=b6487fb9c41705187cf97215fc9e8f86a59057c7;hpb=9a3c9f790aa28fd4708faefe41b4624173922c8e diff --git a/public/javascripts/index.js b/public/javascripts/index.js index 13004f0e..64489262 100644 --- a/public/javascripts/index.js +++ b/public/javascripts/index.js @@ -8,6 +8,7 @@ new Vue({ }, computed: { sortedCounts: function () { + // TODO: priorité aux parties corr où c'est à nous de jouer ! const variantsCounts = variantArray .filter( v => { return v.name.startsWith(this.curPrefix); @@ -74,23 +75,10 @@ new Vue({ } // ...ignore everything else }; - // Show welcome dialog box if "first visit" - const visited = getCookie("visited"); - if (!visited || visited !== "1") - document.getElementById("modalB4welcome").checked = true; - }, - methods: { - showWelcomeMsg: function() { - document.getElementById("modalB4welcome").checked = false; - document.getElementById("modalWelcome").checked = true; - }, - markAsVisited: function() { - setCookie('visited', '1'); - document.getElementById('modalWelcome').checked = false; - }, - setLanguage: function(e) { - setCookie("lang", e.target.value); - location.reload(); //to include the right .pug file - }, }, }); + +// TODO: +// si dernier lastMove sur serveur n'est pas le mien et nextColor == moi, alors background orange +// ==> background orange si à moi de jouer par corr (sur main index) +// (fonction "getNextCol()" dans base_rules.js ?)