X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Findex.js;h=64489262663e9237bd420d3ebeb5ece157830537;hp=e460f868786c94fd2e0c4a7a16fa2cd5233d93aa;hb=b6487fb9c41705187cf97215fc9e8f86a59057c7;hpb=f5722ecec4798fb46dc5c62ad4243139bcdd1032 diff --git a/public/javascripts/index.js b/public/javascripts/index.js index e460f868..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,19 +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; - }, }, }); + +// 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 ?)