projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some TODOs, some refactoring, first test for a future hexagonal board with canvas
[vchess.git]
/
public
/
javascripts
/
index.js
diff --git
a/public/javascripts/index.js
b/public/javascripts/index.js
index
d95f96a
..
6448926
100644
(file)
--- a/
public/javascripts/index.js
+++ b/
public/javascripts/index.js
@@
-1,3
+1,4
@@
+// Javascript for index page: mostly counters updating
new Vue({
el: "#indexPage",
data: {
new Vue({
el: "#indexPage",
data: {
@@
-7,7
+8,12
@@
new Vue({
},
computed: {
sortedCounts: function () {
},
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,
return {
name: v.name,
desc: v.description,
@@
-69,9
+75,10
@@
new Vue({
}
// ...ignore everything else
};
}
// ...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 ?)