X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FGameList.vue;h=183d646306f67d77d5bb37b2ea1f85600dcfc8c8;hb=cafe016679ee9c14bf7bf0a37104ade7f74aff89;hp=0a8bd8ce78faadb6466f52a576de49f764ff9887;hpb=aae89b49a846b2c101d74db7dff9151392d6db34;p=vchess.git diff --git a/client/src/components/GameList.vue b/client/src/components/GameList.vue index 0a8bd8ce..183d6463 100644 --- a/client/src/components/GameList.vue +++ b/client/src/components/GameList.vue @@ -82,7 +82,7 @@ export default { : "b"; if (g.score == "*") { priority++; - if (isMyTurn(g, myColor)) priority++; + if (g.turn == myColor || isMyTurn(g, myColor)) priority++; } } if (g.created < minCreated) minCreated = g.created; @@ -150,7 +150,7 @@ export default { : "Abort and remove game?"; if (confirm(this.st.tr[message])) { const afterDelete = () => { - if (game.score == "*") this.$emit("abort", game); + if (game.score == "*") this.$emit("abortgame", game); this.$set(this.deleted, game.id, true); }; if (game.type == "live") @@ -168,10 +168,12 @@ export default { "/games", "PUT", { - gid: game.id, - newObj: { removeFlag: true } - }, - afterDelete + data: { + gid: game.id, + newObj: { removeFlag: true } + }, + success: afterDelete + } ); } }