- // TODO: classifyObject and filterGames are redundant (see Hall.vue)
- classifyObject: function(o) {
- return (o.timeControl.indexOf('d') === -1 ? "live" : "corr");
+ setDisplay: function(type, e) {
+ this.display = type;
+ localStorage.setItem("type-myGames", type);
+ let elt = e ? e.target : document.getElementById(type + "Games");
+ elt.classList.add("active");
+ if (elt.previousElementSibling)
+ elt.previousElementSibling.classList.remove("active");
+ else elt.nextElementSibling.classList.remove("active");