X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=22ffe45de982a0d3ce8f688837bc83d1c8f203f8;hb=8d15beb4880d40c89d893a3423fb1d0f0ffbc2c6;hp=4708bcfc40ea8ff8e5eeaaace4107dec25d81b73;hpb=7f9a01c07ec7e0aa55854d8cefafb1c94fbff6f3;p=vchess.git diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 4708bcfc..22ffe45d 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -315,20 +315,24 @@ export default { // Automatic challenge sending, for tournaments this.loadNewchallVariant( () => { - this.newchallenge = { - fen: "", - vid: - this.st.variants - .find(v => v.name == this.$route.query["variant"]) - .id, - to: this.$route.query["challenge"], - color: this.$route.query["color"] || '', - cadence: this.$route.query["cadence"], - // Tournament: no randomness (TODO: for now at least) - randomness: 0, - memorize: false - }; - this.issueNewChallenge(); + this.newchallenge = Object.assign( + this.newchallenge, + { + fen: "", + vid: + this.st.variants + .find(v => v.name == this.$route.query["variant"]) + .id, + to: this.$route.query["challenge"], + color: this.$route.query["color"] || '', + cadence: this.$route.query["cadence"], + // Tournament: no randomness (TODO: for now at least) + randomness: 0, + memorize: false + } + ); + window.doClick("modalNewgame"); + //this.issueNewChallenge(); //NOTE: doesn't work yet. }, this.$route.query["variant"] ); @@ -873,10 +877,6 @@ export default { let newGame = game; newGame.type = this.classifyObject(game); newGame.vname = this.getVname(game.vid); - - -console.log(newGame.vname); -console.log(game.vid); if (!game.score) // New game from Hall newGame.score = "*";