From 8d15beb4880d40c89d893a3423fb1d0f0ffbc2c6 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Tue, 16 Mar 2021 13:27:37 +0100 Subject: [PATCH] Cosmetics: display variant name when sending challenge through URL --- client/src/views/Hall.vue | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) 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. }, -- 2.44.0