projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4222cf7
)
Fixes
author
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 11 Mar 2020 08:36:48 +0000
(09:36 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 11 Mar 2020 08:36:48 +0000
(09:36 +0100)
13 files changed:
client/src/App.vue
patch
|
blob
|
blame
|
history
client/src/components/BaseGame.vue
patch
|
blob
|
blame
|
history
client/src/components/ContactForm.vue
patch
|
blob
|
blame
|
history
client/src/components/MoveList.vue
patch
|
blob
|
blame
|
history
client/src/components/Settings.vue
patch
|
blob
|
blame
|
history
client/src/components/UpsertUser.vue
patch
|
blob
|
blame
|
history
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/variants/Antiking.js
patch
|
blob
|
blame
|
history
client/src/views/Game.vue
patch
|
blob
|
blame
|
history
client/src/views/Hall.vue
patch
|
blob
|
blame
|
history
client/src/views/Problems.vue
patch
|
blob
|
blame
|
history
diff --git
a/client/src/App.vue
b/client/src/App.vue
index
312f324
..
8258dc3
100644
(file)
--- a/
client/src/App.vue
+++ b/
client/src/App.vue
@@
-44,8
+44,7
@@
import ContactForm from "@/components/ContactForm.vue";
import Settings from "@/components/Settings.vue";
import UpsertUser from "@/components/UpsertUser.vue";
import ContactForm from "@/components/ContactForm.vue";
import Settings from "@/components/Settings.vue";
import UpsertUser from "@/components/UpsertUser.vue";
-import { store } from "./store.js";
-import { processModalClick } from "./utils/modalClick.js";
+import { store } from "@/store.js";
export default {
components: {
ContactForm,
export default {
components: {
ContactForm,
@@
-57,12
+56,6
@@
export default {
st: store.state
};
},
st: store.state
};
},
- mounted: function() {
- let dialogs = document.querySelectorAll("div[role='dialog']");
- dialogs.forEach(d => {
- d.addEventListener("click", processModalClick);
- });
- },
methods: {
hideDrawer: function(e) {
e.preventDefault(); //TODO: why is this needed?
methods: {
hideDrawer: function(e) {
e.preventDefault(); //TODO: why is this needed?
diff --git
a/client/src/components/BaseGame.vue
b/client/src/components/BaseGame.vue
index
0d5a3bb
..
8e88b05
100644
(file)
--- a/
client/src/components/BaseGame.vue
+++ b/
client/src/components/BaseGame.vue
@@
-138,9
+138,8
@@
export default {
baseGameDiv.addEventListener("keydown", this.handleKeys);
baseGameDiv.addEventListener("wheel", this.handleScroll);
}
baseGameDiv.addEventListener("keydown", this.handleKeys);
baseGameDiv.addEventListener("wheel", this.handleScroll);
}
- document.getElementById("eogDiv").addEventListener(
- "click",
- processModalClick);
+ document.getElementById("eogDiv")
+ .addEventListener("click", processModalClick);
},
methods: {
focusBg: function() {
},
methods: {
focusBg: function() {
diff --git
a/client/src/components/ContactForm.vue
b/client/src/components/ContactForm.vue
index
50270e6
..
e5d2732
100644
(file)
--- a/
client/src/components/ContactForm.vue
+++ b/
client/src/components/ContactForm.vue
@@
-4,7
+4,7
@@
div
type="checkbox"
@change="trySetEnterTime($event)"
)
type="checkbox"
@change="trySetEnterTime($event)"
)
- div(
+ div
#contactDiv
(
role="dialog"
data-checkbox="modalContact"
)
role="dialog"
data-checkbox="modalContact"
)
@@
-26,6
+26,7
@@
div
import { ajax } from "@/utils/ajax";
import { store } from "@/store";
import { checkNameEmail } from "@/data/userCheck";
import { ajax } from "@/utils/ajax";
import { store } from "@/store";
import { checkNameEmail } from "@/data/userCheck";
+import { processModalClick } from "@/utils/modalClick.js";
export default {
name: "my-contact-form",
data: function() {
export default {
name: "my-contact-form",
data: function() {
@@
-35,6
+36,10
@@
export default {
infoMsg: ""
};
},
infoMsg: ""
};
},
+ mounted: function() {
+ document.getElementById("contactDiv")
+ .addEventListener("click", processModalClick);
+ },
methods: {
trySetEnterTime: function(event) {
if (event.target.checked) {
methods: {
trySetEnterTime: function(event) {
if (event.target.checked) {
diff --git
a/client/src/components/MoveList.vue
b/client/src/components/MoveList.vue
index
4428f29
..
c4e1998
100644
(file)
--- a/
client/src/components/MoveList.vue
+++ b/
client/src/components/MoveList.vue
@@
-74,9
+74,8
@@
export default {
};
},
mounted: function() {
};
},
mounted: function() {
- document.getElementById("adjuster").addEventListener(
- "click",
- processModalClick);
+ document.getElementById("adjuster")
+ .addEventListener("click", processModalClick);
if ("ontouchstart" in window) {
// Disable tooltips on smartphones:
document.querySelectorAll("#aboveMoves .tooltip").forEach(elt => {
if ("ontouchstart" in window) {
// Disable tooltips on smartphones:
document.querySelectorAll("#aboveMoves .tooltip").forEach(elt => {
@@
-226,6
+225,6
@@
span#rulesBtn
button
margin: 0
button
margin: 0
-button.tooltip
+#aboveMoves button
padding-bottom: 5px
</style>
padding-bottom: 5px
</style>
diff --git
a/client/src/components/Settings.vue
b/client/src/components/Settings.vue
index
7e90b0f
..
5b79e06
100644
(file)
--- a/
client/src/components/Settings.vue
+++ b/
client/src/components/Settings.vue
@@
-1,7
+1,7
@@
<template lang="pug">
div
input#modalSettings.modal(type="checkbox")
<template lang="pug">
div
input#modalSettings.modal(type="checkbox")
- div(
+ div
#settingsDiv
(
role="dialog"
data-checkbox="modalSettings"
)
role="dialog"
data-checkbox="modalSettings"
)
@@
-27,14
+27,14
@@
div
)
div(@change="updateSettings($event)")
fieldset
)
div(@change="updateSettings($event)")
fieldset
- label(for="setHints") {{ st.tr["Show possible moves
?
"] }}
+ label(for="setHints") {{ st.tr["Show possible moves"] }}
input#setHints(
type="checkbox"
v-model="st.settings.hints"
)
fieldset
label(for="setHighlight")
input#setHints(
type="checkbox"
v-model="st.settings.hints"
)
fieldset
label(for="setHighlight")
- | {{ st.tr["Highlight last move
and checks?
"] }}
+ | {{ st.tr["Highlight last move"] }}
input#setHighlight(
type="checkbox"
v-model="st.settings.highlight"
input#setHighlight(
type="checkbox"
v-model="st.settings.highlight"
@@
-47,14
+47,14
@@
div
option(value="chesstempo") {{ st.tr["blue"] }}
fieldset
label(for="setSound")
option(value="chesstempo") {{ st.tr["blue"] }}
fieldset
label(for="setSound")
- | {{ st.tr["Sound alert
when game starts?
"] }}
+ | {{ st.tr["Sound alert
at game start
"] }}
input#setSound(
type="checkbox"
v-model="st.settings.sound"
)
fieldset
label(for="setGotonext")
input#setSound(
type="checkbox"
v-model="st.settings.sound"
)
fieldset
label(for="setGotonext")
- | {{ st.tr["Show next game after
move?
"] }}
+ | {{ st.tr["Show next game after
a move
"] }}
input#setGotonext(
type="checkbox"
v-model="st.settings.gotonext"
input#setGotonext(
type="checkbox"
v-model="st.settings.gotonext"
@@
-69,6
+69,7
@@
div
<script>
import { store } from "@/store.js";
<script>
import { store } from "@/store.js";
+import { processModalClick } from "@/utils/modalClick.js";
export default {
name: "my-settings",
data: function() {
export default {
name: "my-settings",
data: function() {
@@
-77,6
+78,8
@@
export default {
};
},
mounted: function() {
};
},
mounted: function() {
+ document.getElementById("settingsDiv")
+ .addEventListener("click", processModalClick);
// NOTE: better style would be in pug directly, but how?
document.querySelectorAll("#langSelect > option").forEach(opt => {
if (opt.value == this.st.lang) opt.selected = true;
// NOTE: better style would be in pug directly, but how?
document.querySelectorAll("#langSelect > option").forEach(opt => {
if (opt.value == this.st.lang) opt.selected = true;
diff --git
a/client/src/components/UpsertUser.vue
b/client/src/components/UpsertUser.vue
index
ca322e0
..
dc948cf
100644
(file)
--- a/
client/src/components/UpsertUser.vue
+++ b/
client/src/components/UpsertUser.vue
@@
-4,7
+4,7
@@
div
type="checkbox"
@change="trySetEnterTime($event)"
)
type="checkbox"
@change="trySetEnterTime($event)"
)
- div(
+ div
#upsertDiv
(
role="dialog"
data-checkbox="modalUser"
)
role="dialog"
data-checkbox="modalUser"
)
@@
-59,6
+59,7
@@
div
import { store } from "@/store";
import { checkNameEmail } from "@/data/userCheck";
import { ajax } from "@/utils/ajax";
import { store } from "@/store";
import { checkNameEmail } from "@/data/userCheck";
import { ajax } from "@/utils/ajax";
+import { processModalClick } from "@/utils/modalClick.js";
export default {
name: "my-upsert-user",
data: function() {
export default {
name: "my-upsert-user",
data: function() {
@@
-71,6
+72,10
@@
export default {
user: {}
};
},
user: {}
};
},
+ mounted: function() {
+ document.getElementById("upsertDiv")
+ .addEventListener("click", processModalClick);
+ },
watch: {
nameOrEmail: function(newValue) {
if (newValue.indexOf("@") >= 0) {
watch: {
nameOrEmail: function(newValue) {
if (newValue.indexOf("@") >= 0) {
diff --git
a/client/src/translations/en.js
b/client/src/translations/en.js
index
a3f660e
..
c03a097
100644
(file)
--- a/
client/src/translations/en.js
+++ b/
client/src/translations/en.js
@@
-47,7
+47,7
@@
export const translations = {
Go: "Go",
green: "green",
Hall: "Hall",
Go: "Go",
green: "green",
Hall: "Hall",
- "Highlight last move
and checks?": "Highlight last move and checks?
",
+ "Highlight last move
": "Highlight last move
",
Instructions: "Instructions",
"Invalid email": "Invalid email",
"It's your turn!": "It's your turn!",
Instructions: "Instructions",
"Invalid email": "Invalid email",
"It's your turn!": "It's your turn!",
@@
-119,11
+119,11
@@
export const translations = {
"Self-challenge is forbidden": "Self-challenge is forbidden",
"Send challenge": "Send challenge",
Settings: "Settings",
"Self-challenge is forbidden": "Self-challenge is forbidden",
"Send challenge": "Send challenge",
Settings: "Settings",
- "Show next game after
move?": "Show next game after move?
",
- "Show possible moves
?": "Show possible moves?
",
+ "Show next game after
a move": "Show next game after move
",
+ "Show possible moves
": "Show possible moves
",
"Show solution": "Show solution",
Solution: "Solution",
"Show solution": "Show solution",
Solution: "Solution",
- "Sound alert
when game starts?": "Sound alert when game starts?
",
+ "Sound alert
at game start": "Sound alert at game start
",
Stop: "Stop",
"Stop game": "Stop game",
Subject: "Subject",
Stop: "Stop",
"Stop game": "Stop game",
Subject: "Subject",
diff --git
a/client/src/translations/es.js
b/client/src/translations/es.js
index
3b5c7ab
..
5a4e8df
100644
(file)
--- a/
client/src/translations/es.js
+++ b/
client/src/translations/es.js
@@
-47,7
+47,7
@@
export const translations = {
Go: "Go",
green: "verde",
Hall: "Salón",
Go: "Go",
green: "verde",
Hall: "Salón",
- "Highlight last move
and checks?": "¿Resaltar el último movimiento y jaques?
",
+ "Highlight last move
": "Resaltar el último movimiento
",
Instructions: "Instrucciones",
"Invalid email": "Email inválido",
"It's your turn!": "¡Es su turno!",
Instructions: "Instrucciones",
"Invalid email": "Email inválido",
"It's your turn!": "¡Es su turno!",
@@
-119,11
+119,11
@@
export const translations = {
"Self-challenge is forbidden": "Auto desafío está prohibido",
"Send challenge": "Enviar desafío",
Settings: "Configuraciones",
"Self-challenge is forbidden": "Auto desafío está prohibido",
"Send challenge": "Enviar desafío",
Settings: "Configuraciones",
- "Show next game after
move?": "¿Mostrar la siguiente partida después de una jugada?
",
- "Show possible moves
?": "¿Mostrar posibles movimientos?
",
+ "Show next game after
a move": "Mostrar la siguiente partida después de una jugada
",
+ "Show possible moves
": "Mostrar posibles movimientos
",
"Show solution": "Mostrar la solución",
Solution: "Solución",
"Show solution": "Mostrar la solución",
Solution: "Solución",
- "Sound alert
when game starts?": "¿Alerta audible cuando comienza una partida?
",
+ "Sound alert
at game start": "Alerta audible cuando comienza una partida
",
Stop: "Interrupción",
"Stop game": "Terminar la partida",
Subject: "Asunto",
Stop: "Interrupción",
"Stop game": "Terminar la partida",
Subject: "Asunto",
diff --git
a/client/src/translations/fr.js
b/client/src/translations/fr.js
index
405320c
..
a685d55
100644
(file)
--- a/
client/src/translations/fr.js
+++ b/
client/src/translations/fr.js
@@
-47,7
+47,7
@@
export const translations = {
Go: "Go",
green: "vert",
Hall: "Salon",
Go: "Go",
green: "vert",
Hall: "Salon",
- "Highlight last move
and checks?": "Mettre en valeur le dernier coup et les échecs ?
",
+ "Highlight last move
": "Mettre en valeur le dernier coup
",
Instructions: "Instructions",
"Invalid email": "Email invalide",
"It's your turn!": "À vous de jouer !",
Instructions: "Instructions",
"Invalid email": "Email invalide",
"It's your turn!": "À vous de jouer !",
@@
-119,11
+119,11
@@
export const translations = {
"Self-challenge is forbidden": "Interdit de s'auto-défier",
"Send challenge": "Envoyer défi",
Settings: "Réglages",
"Self-challenge is forbidden": "Interdit de s'auto-défier",
"Send challenge": "Envoyer défi",
Settings: "Réglages",
- "Show next game after
move?": "Montrer la partie suivante après un coup ?
",
- "Show possible moves
?": "Montrer les coups possibles ?
",
+ "Show next game after
a move": "Montrer la partie suivante après un coup
",
+ "Show possible moves
": "Montrer les coups possibles
",
"Show solution": "Montrer la solution",
Solution: "Solution",
"Show solution": "Montrer la solution",
Solution: "Solution",
- "Sound alert
when game starts?": "Alerte sonore quand une partie démarre ?
",
+ "Sound alert
at game start": "Alerte sonore quand une partie démarre
",
Stop: "Arrêt",
"Stop game": "Arrêter la partie",
Subject: "Sujet",
Stop: "Arrêt",
"Stop game": "Arrêter la partie",
Subject: "Sujet",
diff --git
a/client/src/variants/Antiking.js
b/client/src/variants/Antiking.js
index
aa6b54c
..
77f0c83
100644
(file)
--- a/
client/src/variants/Antiking.js
+++ b/
client/src/variants/Antiking.js
@@
-160,6
+160,7
@@
export const VariantRules = class AntikingRules extends ChessRules {
for (let c of ["w", "b"]) {
if (c == 'b' && randomness == 1) {
pieces['b'] = pieces['w'];
for (let c of ["w", "b"]) {
if (c == 'b' && randomness == 1) {
pieces['b'] = pieces['w'];
+ antikingPos['b'] = antikingPos['w'];
break;
}
break;
}
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
703ba18
..
6282680
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-216,9
+216,10
@@
export default {
},
mounted: function() {
document.addEventListener('visibilitychange', this.visibilityChange);
},
mounted: function() {
document.addEventListener('visibilitychange', this.visibilityChange);
- document
- .getElementById("chatWrap")
- .addEventListener("click", processModalClick);
+ ["chatWrap", "infoDiv"].forEach(eltName => {
+ document.getElementById(eltName)
+ .addEventListener("click", processModalClick);
+ });
if ("ontouchstart" in window) {
// Disable tooltips on smartphones:
document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => {
if ("ontouchstart" in window) {
// Disable tooltips on smartphones:
document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => {
diff --git
a/client/src/views/Hall.vue
b/client/src/views/Hall.vue
index
608c5d5
..
829e5b7
100644
(file)
--- a/
client/src/views/Hall.vue
+++ b/
client/src/views/Hall.vue
@@
-381,8
+381,8
@@
export default {
mounted: function() {
document.addEventListener('visibilitychange', this.visibilityChange);
["peopleWrap", "infoDiv", "newgameDiv"].forEach(eltName => {
mounted: function() {
document.addEventListener('visibilitychange', this.visibilityChange);
["peopleWrap", "infoDiv", "newgameDiv"].forEach(eltName => {
- let elt = document.getElementById(eltName);
-
elt
.addEventListener("click", processModalClick);
+ document.getElementById(eltName)
+
.addEventListener("click", processModalClick);
});
document.querySelectorAll("#predefinedCadences > button").forEach(b => {
b.addEventListener("click", () => {
});
document.querySelectorAll("#predefinedCadences > button").forEach(b => {
b.addEventListener("click", () => {
diff --git
a/client/src/views/Problems.vue
b/client/src/views/Problems.vue
index
ef05e12
..
71f5c3e
100644
(file)
--- a/
client/src/views/Problems.vue
+++ b/
client/src/views/Problems.vue
@@
-188,8
+188,7
@@
export default {
);
},
mounted: function() {
);
},
mounted: function() {
- document
- .getElementById("newprobDiv")
+ document.getElementById("newprobDiv")
.addEventListener("click", processModalClick);
},
watch: {
.addEventListener("click", processModalClick);
},
watch: {