projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MyGames page is now dynamic (experimental, not much tested)
[vchess.git]
/
client
/
src
/
components
/
GameList.vue
diff --git
a/client/src/components/GameList.vue
b/client/src/components/GameList.vue
index
0a8bd8c
..
183d646
100644
(file)
--- a/
client/src/components/GameList.vue
+++ b/
client/src/components/GameList.vue
@@
-82,7
+82,7
@@
export default {
: "b";
if (g.score == "*") {
priority++;
: "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;
}
}
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 = () => {
: "Abort and remove game?";
if (confirm(this.st.tr[message])) {
const afterDelete = () => {
- if (game.score == "*") this.$emit("abort", game);
+ if (game.score == "*") this.$emit("abort
game
", game);
this.$set(this.deleted, game.id, true);
};
if (game.type == "live")
this.$set(this.deleted, game.id, true);
};
if (game.type == "live")
@@
-168,10
+168,12
@@
export default {
"/games",
"PUT",
{
"/games",
"PUT",
{
- gid: game.id,
- newObj: { removeFlag: true }
- },
- afterDelete
+ data: {
+ gid: game.id,
+ newObj: { removeFlag: true }
+ },
+ success: afterDelete
+ }
);
}
}
);
}
}