"/runninggames",
"GET",
{
+ credentials: true,
success: (res) => {
// These games are garanteed to not be deleted
this.corrGames = res.games;
- this.corrGames.forEach(g => g.type = "corr");
+ this.corrGames.forEach(g => {
+ g.type = "corr";
+ g.score = "*";
+ });
this.decorate(this.corrGames);
// Now ask completed games (partial list)
ajax(
"/completedgames",
"GET",
{
+ credentials: true,
data: { cursor: this.cursor },
success: (res2) => {
- if (res2.games.length > 0) {
- const L = res2.games.length;
+ const L = res2.games.length;
+ if (L > 0) {
this.cursor = res2.games[L - 1].created;
let completedGames = res2.games;
completedGames.forEach(g => g.type = "corr");
if (thing == "turn") {
game.myTurn = !game.myTurn;
if (game.myTurn) this.tryShowNewsIndicator(type);
- }
+ } else game.myTurn = false;
// TODO: forcing refresh like that is ugly and wrong.
// How to do it cleanly?
this.$refs[type + "games"].$forceUpdate();
"/completedgames",
"GET",
{
+ credentials: true,
data: { cursor: this.cursor },
success: (res) => {
- if (res.games.length > 0) {
- const L = res.games.length;
+ const L = res.games.length;
+ if (L > 0) {
this.cursor = res.games[L - 1].created;
let moreGames = res.games;
moreGames.forEach(g => g.type = "corr");
max-height: 100%
button#loadMoreBtn
- margin-top: 0
- margin-bottom: 0
+ display: block
+ margin: 0 auto
.somethingnew
background-color: #c5fefe !important