From: Benjamin Auder Date: Tue, 16 Mar 2021 12:27:37 +0000 (+0100) Subject: Cosmetics: display variant name when sending challenge through URL X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/css/doc/html/%7B%7B%20targetUrl%20%7D%7D?a=commitdiff_plain;h=8d15beb4880d40c89d893a3423fb1d0f0ffbc2c6;p=vchess.git Cosmetics: display variant name when sending challenge through URL --- diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 39b90271..22ffe45d 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -315,19 +315,22 @@ 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.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. },