projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bc9b5f2
)
Fixes
author
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 9 Feb 2020 01:07:30 +0000
(
02:07
+0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 9 Feb 2020 01:07:30 +0000
(
02:07
+0100)
client/src/translations/en.js
patch
|
blob
|
blame
|
history
client/src/translations/es.js
patch
|
blob
|
blame
|
history
client/src/translations/fr.js
patch
|
blob
|
blame
|
history
client/src/views/Game.vue
patch
|
blob
|
blame
|
history
client/src/views/Hall.vue
patch
|
blob
|
blame
|
history
diff --git
a/client/src/translations/en.js
b/client/src/translations/en.js
index
bb5f39f
..
ae1101d
100644
(file)
--- a/
client/src/translations/en.js
+++ b/
client/src/translations/en.js
@@
-60,6
+60,7
@@
export const translations =
"Play with?": "Play with?",
"Playing": "Playing",
"Please log in to accept corr challenges": "Please log in to accept corr challenges",
"Play with?": "Play with?",
"Playing": "Playing",
"Please log in to accept corr challenges": "Please log in to accept corr challenges",
+ "Please log in to play correspondance games": "Please log in to play correspondance games",
"Please select a variant": "Please select a variant",
"Practice": "Practice",
"Processing... Please wait": "Processing... Please wait",
"Please select a variant": "Please select a variant",
"Practice": "Practice",
"Processing... Please wait": "Processing... Please wait",
diff --git
a/client/src/translations/es.js
b/client/src/translations/es.js
index
0b1830d
..
0e9724b
100644
(file)
--- a/
client/src/translations/es.js
+++ b/
client/src/translations/es.js
@@
-60,6
+60,7
@@
export const translations =
"Play with?": "¿ Jugar con ?",
"Playing": "Jugando",
"Please log in to accept corr challenges": "Inicia sesión para aceptar los desafíos por correspondencia",
"Play with?": "¿ Jugar con ?",
"Playing": "Jugando",
"Please log in to accept corr challenges": "Inicia sesión para aceptar los desafíos por correspondencia",
+ "Please log in to play correspondance games": "Inicia sesión para jugar partidas por correspondancia",
"Please select a variant": "Por favor seleccione una variante",
"Practice": "Práctica",
"Processing... Please wait": "Procesando... por favor espere",
"Please select a variant": "Por favor seleccione una variante",
"Practice": "Práctica",
"Processing... Please wait": "Procesando... por favor espere",
diff --git
a/client/src/translations/fr.js
b/client/src/translations/fr.js
index
54e316c
..
1567351
100644
(file)
--- a/
client/src/translations/fr.js
+++ b/
client/src/translations/fr.js
@@
-60,6
+60,7
@@
export const translations =
"Play with?": "Jouer avec ?",
"Playing": "Jouant",
"Please log in to accept corr challenges": "Identifiez vous pour accepter des défis par correspondance",
"Play with?": "Jouer avec ?",
"Playing": "Jouant",
"Please log in to accept corr challenges": "Identifiez vous pour accepter des défis par correspondance",
+ "Please log in to play correspondance games": "Identifiez vous pour jouer des parties par correspondance",
"Please select a variant": "Sélectionnez une variante SVP",
"Practice": "Pratiquer",
"Processing... Please wait": "Traitement en cours... Attendez SVP",
"Please select a variant": "Sélectionnez une variante SVP",
"Practice": "Pratiquer",
"Processing... Please wait": "Traitement en cours... Attendez SVP",
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
baa9ae1
..
0072bd4
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-152,10
+152,13
@@
export default {
this.st.conn.send(JSON.stringify({code:"pollclients"}));
},
isConnected: function(index) {
this.st.conn.send(JSON.stringify({code:"pollclients"}));
},
isConnected: function(index) {
- const name = this.game.players[index].name;
- if (this.st.user.name == name)
+ const player = this.game.players[index];
+ // Is it me ?
+ if (this.st.user.sid == player.sid || this.st.user.id == player.uid)
return true;
return true;
- return Object.values(this.people).some(p => p.name == name);
+ // Try to find a match in people:
+ return Object.keys(this.people).some(sid => sid == player.sid) ||
+ Object.values(this.people).some(p => p.id == player.uid);
},
socketMessageListener: function(msg) {
const data = JSON.parse(msg.data);
},
socketMessageListener: function(msg) {
const data = JSON.parse(msg.data);
diff --git
a/client/src/views/Hall.vue
b/client/src/views/Hall.vue
index
fbd5e28
..
bbff9b9
100644
(file)
--- a/
client/src/views/Hall.vue
+++ b/
client/src/views/Hall.vue
@@
-509,17
+509,18
@@
export default {
this.newchallenge.to = this.people[sid].name;
doClick("modalNewgame");
},
this.newchallenge.to = this.people[sid].name;
doClick("modalNewgame");
},
- challOrWatch: function(sid
, e
) {
-
switch (e.target.innerHTML
)
+ challOrWatch: function(sid) {
+
if (!this.people[sid].gamer
)
{
{
- case "Available":
- this.tryChallenge(sid);
- break;
- case "Playing":
- this.showGame(this.games.find(
- g => g.players.some(pl => pl.sid == sid || pl.uid == this.people[sid].id)));
- break;
- };
+ // Available, in Hall
+ this.tryChallenge(sid);
+ }
+ else
+ {
+ // Playing, in Game
+ this.showGame(this.games.find(
+ g => g.players.some(pl => pl.sid == sid || pl.uid == this.people[sid].id)));
+ }
},
newChallenge: async function() {
if (this.newchallenge.vid == "")
},
newChallenge: async function() {
if (this.newchallenge.vid == "")