X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=03d34119618bb2583cf1e4a6a464e96ca28cdc6d;hb=9a1e3abe33fff07218b17c7c799eb622a730b7c7;hp=0e4d574b0539b61f5666691a2b87f6e69e247040;hpb=beda3dd096a455ed337eaaeadc400712bf0f5c6d;p=vchess.git diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 0e4d574b..03d34119 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -563,11 +563,7 @@ export default { // o: challenge or game classifyObject: function(o) { // No imported games here - return ( - o.cadence.indexOf("d") >= 0 - ? "corr" - : (o.cadence.indexOf("/") >= 0 ? "simul" : "live") - ); + return (o.cadence.indexOf("d") >= 0 ? "corr" : "live"); }, setDisplay: function(letter, type, e) { this[letter + "display"] = type; @@ -857,10 +853,6 @@ export default { } break; } - case "entersimul": - // TODO: confirm box accept/refuse. - // If accept, update seat (array in this case) - break; case "game": // Individual request case "newgame": { const game = data.data; @@ -1225,13 +1217,6 @@ export default { alert(this.st.tr["Please log in to accept corr challenges"]); return; } - if (c.type == "simul") { - // Just notify that I wanna enter the simultaneous game(s) - // TODO: dans défi, indiquer si positions aleatoires, si tjours blancs ou noirs - // --> /w30 ou b1h ou juste 30 (random, sans préfixe). - // => message "entersimul" to c.from - return; - } else { c.accepted = true; await import("@/variants/" + c.vname + ".js") @@ -1262,19 +1247,12 @@ export default { { data: { id: c.id } } ); } - else if (c.type == "simul" && !!c.seat && Array.isArray(c.seat)) - // TODO: if some players entered, start game - this.launchSimultaneous(c); this.send("deletechallenge_s", { data: { cid: c.id } }); } // In all cases, the challenge is consumed: ArrayFun.remove(this.challenges, ch => ch.id == c.id); }, // NOTE: when launching game, the challenge is already being deleted - // TODO: adapt for simultaneous games, or just write a new function (better) - launchSimultaneous: function(c) { - // TODO - }, launchGame: function(c) { // White player index 0, black player index 1: let players = @@ -1372,7 +1350,7 @@ export default { new Audio("/sounds/newgame.flac").play().catch(() => {}); notify( "New live game", - { body: "vs " + game.players[1-myIdx].name || "@nonymous" } + { body: "vs " + (game.players[1-myIdx].name || "@nonymous") } ); } this.$router.push("/game/" + gameInfo.id);