projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix 'correspondence' spelling
[vchess.git]
/
client
/
src
/
views
/
MyGames.vue
diff --git
a/client/src/views/MyGames.vue
b/client/src/views/MyGames.vue
index
ea9b49d
..
1363204
100644
(file)
--- a/
client/src/views/MyGames.vue
+++ b/
client/src/views/MyGames.vue
@@
-31,6
+31,7
@@
main
v-show="display=='import'"
ref="importgames"
:games="importGames"
v-show="display=='import'"
ref="importgames"
:games="importGames"
+ :show-both="true"
@show-game="showGame"
)
button#loadMoreBtn(
@show-game="showGame"
)
button#loadMoreBtn(
@@
-111,7
+112,7
@@
export default {
},
mounted: function() {
const adjustAndSetDisplay = () => {
},
mounted: function() {
const adjustAndSetDisplay = () => {
- // showType is the last type viwed by the user (default)
+ // showType is the last type vi
e
wed by the user (default)
let showType = localStorage.getItem("type-myGames") || "live";
// Live games, my turn: highest priority:
if (this.liveGames.some(g => !!g.myTurn)) showType = "live";
let showType = localStorage.getItem("type-myGames") || "live";
// Live games, my turn: highest priority:
if (this.liveGames.some(g => !!g.myTurn)) showType = "live";
@@
-182,7
+183,7
@@
export default {
setDisplay: function(type, e) {
this.display = type;
localStorage.setItem("type-myGames", type);
setDisplay: function(type, e) {
this.display = type;
localStorage.setItem("type-myGames", type);
- let elt =
e ? e.target : document.getElementById(type + "Games"
);
+ let elt =
(!!e ? e.target : document.getElementById(type + "Games")
);
elt.classList.add("active");
elt.classList.remove("somethingnew"); //in case of
for (let t of ["live","corr","import"]) {
elt.classList.add("active");
elt.classList.remove("somethingnew"); //in case of
for (let t of ["live","corr","import"]) {
@@
-251,7
+252,8
@@
export default {
if (thing == "turn") {
game.myTurn = !game.myTurn;
if (game.myTurn) this.tryShowNewsIndicator(type);
if (thing == "turn") {
game.myTurn = !game.myTurn;
if (game.myTurn) this.tryShowNewsIndicator(type);
- } else game.myTurn = false;
+ }
+ else game.myTurn = false;
// TODO: forcing refresh like that is ugly and wrong.
// How to do it cleanly?
this.$refs[type + "games"].$forceUpdate();
// TODO: forcing refresh like that is ugly and wrong.
// How to do it cleanly?
this.$refs[type + "games"].$forceUpdate();
@@
-356,7
+358,8
@@
export default {
moreGames.forEach(g => g.type = "corr");
this.decorate(moreGames);
this.corrGames = this.corrGames.concat(moreGames);
moreGames.forEach(g => g.type = "corr");
this.decorate(moreGames);
this.corrGames = this.corrGames.concat(moreGames);
- } else this.hasMore["corr"] = false;
+ }
+ else this.hasMore["corr"] = false;
if (!!cb) cb();
}
}
if (!!cb) cb();
}
}
@@
-371,7
+374,8
@@
export default {
localGames.forEach(g => g.type = "live");
this.decorate(localGames);
this.liveGames = this.liveGames.concat(localGames);
localGames.forEach(g => g.type = "live");
this.decorate(localGames);
this.liveGames = this.liveGames.concat(localGames);
- } else this.hasMore["live"] = false;
+ }
+ else this.hasMore["live"] = false;
if (!!cb) cb();
});
}
if (!!cb) cb();
});
}
@@
-383,7
+387,8
@@
export default {
this.cursor["import"] = importGames[L - 1].created - 1;
importGames.forEach(g => g.type = "import");
this.importGames = this.importGames.concat(importGames);
this.cursor["import"] = importGames[L - 1].created - 1;
importGames.forEach(g => g.type = "import");
this.importGames = this.importGames.concat(importGames);
- } else this.hasMore["import"] = false;
+ }
+ else this.hasMore["import"] = false;
if (!!cb) cb();
});
}
if (!!cb) cb();
});
}
@@
-392,20
+397,23
@@
export default {
};
</script>
};
</script>
-<style lang="sass">
+<style lang="sass"
scoped
>
.active
.active
- color: #
42a983
+ color: #
388e3c
.tabbtn
background-color: #f9faee
.tabbtn
background-color: #f9faee
-table.game-list
- max-height: 100%
-
button#loadMoreBtn
display: block
margin: 0 auto
.somethingnew
button#loadMoreBtn
display: block
margin: 0 auto
.somethingnew
- background-color: #c5fefe !important
+ background-color: #90C4EC !important
+</style>
+
+<!-- Not scoped because acting on GameList -->
+<style lang="sass">
+table.game-list
+ max-height: 100%
</style>
</style>