+// Javascript for index page: mostly counters updating
new Vue({
el: "#indexPage",
data: {
},
computed: {
sortedCounts: function () {
- const variantsCounts = variantArray.map( v => {
+ // TODO: priorité aux parties corr où c'est à nous de jouer !
+ const variantsCounts = variantArray
+ .filter( v => {
+ return v.name.startsWith(this.curPrefix);
+ })
+ .map( v => {
return {
name: v.name,
desc: v.description,
}
// ...ignore everything else
};
- // Show welcome dialog box if "first visit"
- const visited = getCookie("visited");
- if (!visited || visited !== "1")
- document.getElementById("modal-welcome").checked = true;
},
});
+
+// 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 ?)