projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Advance on corr game start
[vchess.git]
/
client
/
src
/
views
/
Hall.vue
diff --git
a/client/src/views/Hall.vue
b/client/src/views/Hall.vue
index
4c80803
..
0467dab
100644
(file)
--- a/
client/src/views/Hall.vue
+++ b/
client/src/views/Hall.vue
@@
-509,15
+509,17
@@
export default {
cid: c.id, target: c.from.sid}));
}
}
cid: c.id, target: c.from.sid}));
}
}
- else
- localStorage.removeItem("challenge");
- if (c.type == "corr")
+ else //my challenge
{
{
- ajax(
- "/challenges",
- "DELETE",
- {id: c.id}
- );
+ localStorage.removeItem("challenge");
+ if (c.type == "corr")
+ {
+ ajax(
+ "/challenges",
+ "DELETE",
+ {id: c.id}
+ );
+ }
}
},
// NOTE: when launching game, the challenge is already deleted
}
},
// NOTE: when launching game, the challenge is already deleted
@@
-542,9
+544,9
@@
export default {
ajax(
"/games",
"POST",
ajax(
"/games",
"POST",
- {gameInfo: gameInfo}
+ {gameInfo: gameInfo, cid: c.id}, //cid useful to delete challenge
+ response => { this.$router.push("/game/" + response.gameId); }
);
);
- // TODO: redirection here
}
},
// NOTE: for live games only (corr games start on the server)
}
},
// NOTE: for live games only (corr games start on the server)