projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd41e58
)
'update'
author
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 12 Feb 2020 14:36:40 +0000
(15:36 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 12 Feb 2020 14:36:40 +0000
(15:36 +0100)
24 files changed:
client/src/App.vue
patch
|
blob
|
blame
|
history
client/src/components/BaseGame.vue
patch
|
blob
|
blame
|
history
client/src/components/Board.vue
patch
|
blob
|
blame
|
history
client/src/components/ChallengeList.vue
patch
|
blob
|
blame
|
history
client/src/components/Chat.vue
patch
|
blob
|
blame
|
history
client/src/components/ComputerGame.vue
patch
|
blob
|
blame
|
history
client/src/components/ContactForm.vue
patch
|
blob
|
blame
|
history
client/src/components/GameList.vue
patch
|
blob
|
blame
|
history
client/src/components/MoveList.vue
patch
|
blob
|
blame
|
history
client/src/components/Welcome.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/translations/welcome/en.pug
patch
|
blob
|
blame
|
history
client/src/translations/welcome/es.pug
patch
|
blob
|
blame
|
history
client/src/translations/welcome/fr.pug
patch
|
blob
|
blame
|
history
client/src/views/About.vue
patch
|
blob
|
blame
|
history
client/src/views/Analyse.vue
patch
|
blob
|
blame
|
history
client/src/views/Auth.vue
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/Logout.vue
patch
|
blob
|
blame
|
history
client/src/views/MyGames.vue
patch
|
blob
|
blame
|
history
client/src/views/Rules.vue
patch
|
blob
|
blame
|
history
diff --git
a/client/src/App.vue
b/client/src/App.vue
index
592861d
..
f4f0cf7
100644
(file)
--- a/
client/src/App.vue
+++ b/
client/src/App.vue
@@
-14,7
+14,7
@@
nav
label.drawer-toggle(for="drawerControl")
input#drawerControl.drawer(type="checkbox")
nav
label.drawer-toggle(for="drawerControl")
input#drawerControl.drawer(type="checkbox")
- #menuBar(@click="hideDrawer")
+ #menuBar(@click="hideDrawer
()
")
label.drawer-close(for="drawerControl")
#leftMenu
router-link(to="/")
label.drawer-close(for="drawerControl")
#leftMenu
router-link(to="/")
diff --git
a/client/src/components/BaseGame.vue
b/client/src/components/BaseGame.vue
index
0e0f372
..
4536405
100644
(file)
--- a/
client/src/components/BaseGame.vue
+++ b/
client/src/components/BaseGame.vue
@@
-1,5
+1,5
@@
<template lang="pug">
<template lang="pug">
-div#baseGame(tabindex=-1 @click="
() =>
focusBg()"
+div#baseGame(tabindex=-1 @click="focusBg()"
@keydown="handleKeys" @wheel="handleScroll")
input#modalEog.modal(type="checkbox")
div#eogDiv(role="dialog" data-checkbox="modalEog" aria-labelledby="eogMessage")
@keydown="handleKeys" @wheel="handleScroll")
input#modalEog.modal(type="checkbox")
div#eogDiv(role="dialog" data-checkbox="modalEog" aria-labelledby="eogMessage")
@@
-21,21
+21,21
@@
div#baseGame(tabindex=-1 @click="() => focusBg()"
#turnIndicator(v-if="game.vname=='Dark' && game.score=='*'")
| {{ turn }}
#controls
#turnIndicator(v-if="game.vname=='Dark' && game.score=='*'")
| {{ turn }}
#controls
- button(@click="gotoBegin") <<
- button(@click="
() =>
undo()") <
- button(@click="flip") ⇅
- button(@click="
() =>
play()") >
- button(@click="gotoEnd") >>
+ button(@click="gotoBegin
()
") <<
+ button(@click="undo()") <
+ button(@click="flip
()
") ⇅
+ button(@click="play()") >
+ button(@click="gotoEnd
()
") >>
#pgnDiv
#downloadDiv(v-if="game.vname!='Dark' || game.score!='*'")
a#download(href="#")
#pgnDiv
#downloadDiv(v-if="game.vname!='Dark' || game.score!='*'")
a#download(href="#")
- button(@click="download") {{ st.tr["Download"] }} PGN
+ button(@click="download
()
") {{ st.tr["Download"] }} PGN
button(onClick="doClick('modalAdjust')") ⤢
button(v-if="game.vname!='Dark' && game.mode!='analyze'"
button(onClick="doClick('modalAdjust')") ⤢
button(v-if="game.vname!='Dark' && game.mode!='analyze'"
- @click="analyzePosition")
+ @click="analyzePosition
()
")
| {{ st.tr["Analyse"] }}
// NOTE: rather ugly hack to avoid showing twice "rules" link...
| {{ st.tr["Analyse"] }}
// NOTE: rather ugly hack to avoid showing twice "rules" link...
- button(v-if="!$route.path.match('/variants/')" @click="showRules")
+ button(v-if="!$route.path.match('/variants/')" @click="showRules
()
")
| {{ st.tr["Rules"] }}
#movesList
MoveList(v-if="showMoves" :score="game.score" :message="game.scoreMsg"
| {{ st.tr["Rules"] }}
#movesList
MoveList(v-if="showMoves" :score="game.score" :message="game.scoreMsg"
@@
-52,7
+52,6
@@
import { getSquareId } from "@/utils/squareId";
import { getDate } from "@/utils/datetime";
import { processModalClick } from "@/utils/modalClick";
import { getScoreMessage } from "@/utils/scoring";
import { getDate } from "@/utils/datetime";
import { processModalClick } from "@/utils/modalClick";
import { getScoreMessage } from "@/utils/scoring";
-
export default {
name: 'my-base-game',
components: {
export default {
name: 'my-base-game',
components: {
diff --git
a/client/src/components/Board.vue
b/client/src/components/Board.vue
index
5bc8ec2
..
ddc1373
100644
(file)
--- a/
client/src/components/Board.vue
+++ b/
client/src/components/Board.vue
@@
-2,7
+2,6
@@
import { getSquareId, getSquareFromId } from "@/utils/squareId";
import { ArrayFun } from "@/utils/array";
import { store } from "@/store";
import { getSquareId, getSquareFromId } from "@/utils/squareId";
import { ArrayFun } from "@/utils/array";
import { store } from "@/store";
-
export default {
name: 'my-board',
// Last move cannot be guessed from here, and is required to highlight squares
export default {
name: 'my-board',
// Last move cannot be guessed from here, and is required to highlight squares
diff --git
a/client/src/components/ChallengeList.vue
b/client/src/components/ChallengeList.vue
index
95a71ac
..
bffda1a
100644
(file)
--- a/
client/src/components/ChallengeList.vue
+++ b/
client/src/components/ChallengeList.vue
@@
-17,7
+17,6
@@
div
<script>
import { store } from "@/store";
<script>
import { store } from "@/store";
-
export default {
name: "my-challenge-list",
props: ["challenges"],
export default {
name: "my-challenge-list",
props: ["challenges"],
diff --git
a/client/src/components/Chat.vue
b/client/src/components/Chat.vue
index
7eeba5a
..
c5fde45
100644
(file)
--- a/
client/src/components/Chat.vue
+++ b/
client/src/components/Chat.vue
@@
-2,7
+2,7
@@
div
input#inputChat(type="text" :placeholder="st.tr['Type here']"
@keyup.enter="sendChat")
div
input#inputChat(type="text" :placeholder="st.tr['Type here']"
@keyup.enter="sendChat")
- button#sendChatBtn(@click="sendChat") {{ st.tr["Send"] }}
+ button#sendChatBtn(@click="sendChat
()
") {{ st.tr["Send"] }}
p(v-for="chat in chats" :class="classObject(chat)"
v-html="chat.name + ': ' + chat.msg")
p(v-for="chat in pastChats" :class="classObject(chat)"
p(v-for="chat in chats" :class="classObject(chat)"
v-html="chat.name + ': ' + chat.msg")
p(v-for="chat in pastChats" :class="classObject(chat)"
@@
-11,7
+11,6
@@
div
<script>
import { store } from "@/store";
<script>
import { store } from "@/store";
-
export default {
name: "my-chat",
// Prop 'pastChats' for corr games where chats are on server
export default {
name: "my-chat",
// Prop 'pastChats' for corr games where chats are on server
diff --git
a/client/src/components/ComputerGame.vue
b/client/src/components/ComputerGame.vue
index
14c1b07
..
b20b8fe
100644
(file)
--- a/
client/src/components/ComputerGame.vue
+++ b/
client/src/components/ComputerGame.vue
@@
-7,7
+7,6
@@
BaseGame(:game="game" :vr="vr" ref="basegame"
import BaseGame from "@/components/BaseGame.vue";
import { store } from "@/store";
import Worker from "worker-loader!@/playCompMove";
import BaseGame from "@/components/BaseGame.vue";
import { store } from "@/store";
import Worker from "worker-loader!@/playCompMove";
-
export default {
name: "my-computer-game",
components: {
export default {
name: "my-computer-game",
components: {
diff --git
a/client/src/components/ContactForm.vue
b/client/src/components/ContactForm.vue
index
9ca337d
..
9ac5710
100644
(file)
--- a/
client/src/components/ContactForm.vue
+++ b/
client/src/components/ContactForm.vue
@@
-17,7
+17,7
@@
div
br
textarea#mailContent
fieldset
br
textarea#mailContent
fieldset
- button(type="button" @click="trySendMessage") {{ st.tr["Send"] }}
+ button(type="button" @click="trySendMessage
()
") {{ st.tr["Send"] }}
p#emailSent {{ st.tr["Email sent!"] }}
</template>
p#emailSent {{ st.tr["Email sent!"] }}
</template>
@@
-25,7
+25,6
@@
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";
-
export default {
name: "my-contact-form",
data: function() {
export default {
name: "my-contact-form",
data: function() {
diff --git
a/client/src/components/GameList.vue
b/client/src/components/GameList.vue
index
2435930
..
5a4c8f7
100644
(file)
--- a/
client/src/components/GameList.vue
+++ b/
client/src/components/GameList.vue
@@
-15,12
+15,14
@@
div
td(data-label="White") {{ g.players[0].name || "@nonymous" }}
td(data-label="Black") {{ g.players[1].name || "@nonymous" }}
td(data-label="Time control") {{ g.cadence }}
td(data-label="White") {{ g.players[0].name || "@nonymous" }}
td(data-label="Black") {{ g.players[1].name || "@nonymous" }}
td(data-label="Time control") {{ g.cadence }}
- td(data-label="Result") {{ g.score }}
+ td(data-label="Result" :class="{finished: g.score!='*'}"
+ @click.stop="deleteGame(g)")
+ | {{ g.score }}
</template>
<script>
import { store } from "@/store";
</template>
<script>
import { store } from "@/store";
-
+import { GameStorage } from "@/utils/gameStorage";
export default {
name: "my-game-list",
props: ["games"],
export default {
name: "my-game-list",
props: ["games"],
@@
-55,6
+57,12
@@
export default {
return augmentedGames.sort((g1,g2) => { return g2.priority - g1.priority; });
},
},
return augmentedGames.sort((g1,g2) => { return g2.priority - g1.priority; });
},
},
+ methods: {
+ deleteGame: function(game) {
+ if (confirm(this.st.tr["Remove game ?"]))
+ GameStorage.remove(game.id);
+ },
+ },
};
</script>
};
</script>
@@
-62,4
+70,6
@@
export default {
// TODO: understand why the style applied to <tr> element doesn't work
tr.my-turn > td
background-color: #fcd785
// TODO: understand why the style applied to <tr> element doesn't work
tr.my-turn > td
background-color: #fcd785
+tr td.finished
+ background-color: red
</style>
</style>
diff --git
a/client/src/components/MoveList.vue
b/client/src/components/MoveList.vue
index
e3da8dd
..
ffa102e
100644
(file)
--- a/
client/src/components/MoveList.vue
+++ b/
client/src/components/MoveList.vue
@@
-1,6
+1,5
@@
<script>
import { store } from "@/store";
<script>
import { store } from "@/store";
-// Component for moves list on the right
export default {
name: 'my-move-list',
props: ["moves","cursor","score","message","firstNum"],
export default {
name: 'my-move-list',
props: ["moves","cursor","score","message","firstNum"],
diff --git
a/client/src/components/Welcome.vue
b/client/src/components/Welcome.vue
index
2e2cb82
..
5f336e8
100644
(file)
--- a/
client/src/components/Welcome.vue
+++ b/
client/src/components/Welcome.vue
@@
-4,16
+4,23
@@
div
div(role="dialog")
.card
div(v-html="content")
div(role="dialog")
.card
div(v-html="content")
+ p#disableMsg.clickable(@click="closeAndDisable()")
+ | {{ st.tr["Close and show no more"] }}
</template>
<script>
import { store } from "@/store.js";
export default {
name: "my-welcome",
</template>
<script>
import { store } from "@/store.js";
export default {
name: "my-welcome",
+ data: function() {
+ return {
+ st: store.state,
+ };
+ },
computed: {
content: function() {
// (AJAX) Request to get welcome content (plain text, HTML)
computed: {
content: function() {
// (AJAX) Request to get welcome content (plain text, HTML)
- return require("raw-loader!@/translations/welcome/" +
store.state
.lang + ".pug")
+ return require("raw-loader!@/translations/welcome/" +
this.st
.lang + ".pug")
// Next two lines fix a weird issue after last update (2019-11)
.replace(/\\n/g, " ").replace(/\\"/g, '"')
.replace('module.exports = "', '').replace(/"$/, "");
// Next two lines fix a weird issue after last update (2019-11)
.replace(/\\n/g, " ").replace(/\\"/g, '"')
.replace('module.exports = "', '').replace(/"$/, "");
@@
-27,3
+34,10
@@
export default {
},
};
</script>
},
};
</script>
+
+<style lang="sass">
+p#credits
+ font-size: 0.8rem
+ margin-top: -10px
+ text-align: center
+</style>
diff --git
a/client/src/translations/en.js
b/client/src/translations/en.js
index
66a4b9e
..
39d7f4b
100644
(file)
--- a/
client/src/translations/en.js
+++ b/
client/src/translations/en.js
@@
-18,6
+18,7
@@
export const translations =
"Cadence": "Cadence",
"Challenge": "Challenge",
"Challenge declined": "Challenge declined",
"Cadence": "Cadence",
"Challenge": "Challenge",
"Challenge declined": "Challenge declined",
+ "Close and show no more": "Close and show no more",
"Connection token sent. Check your emails!": "Connection token sent. Check your emails!",
"Contact": "Contact",
"Contact form": "Contact form",
"Connection token sent. Check your emails!": "Connection token sent. Check your emails!",
"Contact": "Contact",
"Contact form": "Contact form",
diff --git
a/client/src/translations/es.js
b/client/src/translations/es.js
index
d103124
..
2a01b1d
100644
(file)
--- a/
client/src/translations/es.js
+++ b/
client/src/translations/es.js
@@
-18,6
+18,7
@@
export const translations =
"Cadence": "Cadencia",
"Challenge": "Desafiar",
"Challenge declined": "Desafío rechazado",
"Cadence": "Cadencia",
"Challenge": "Desafiar",
"Challenge declined": "Desafío rechazado",
+ "Close and show no more": "Cerrar y no mostrar más",
"Connection token sent. Check your emails!": "Token de conexión enviado. ¡ Revisa tus correos !",
"Contact": "Contacto",
"Contact form": "Formulario de contacto",
"Connection token sent. Check your emails!": "Token de conexión enviado. ¡ Revisa tus correos !",
"Contact": "Contacto",
"Contact form": "Formulario de contacto",
diff --git
a/client/src/translations/fr.js
b/client/src/translations/fr.js
index
77a6a33
..
fbaffc6
100644
(file)
--- a/
client/src/translations/fr.js
+++ b/
client/src/translations/fr.js
@@
-18,6
+18,7
@@
export const translations =
"Cadence": "Cadence",
"Challenge": "Défier",
"Challenge declined": "Défi refusé",
"Cadence": "Cadence",
"Challenge": "Défier",
"Challenge declined": "Défi refusé",
+ "Close and show no more": "Fermer et ne plus montrer",
"Connection token sent. Check your emails!": "Token de connection envoyé. Allez voir vos emails !",
"Contact": "Contact",
"Contact form": "Formulaire de contact",
"Connection token sent. Check your emails!": "Token de connection envoyé. Allez voir vos emails !",
"Contact": "Contact",
"Contact form": "Formulaire de contact",
diff --git
a/client/src/translations/welcome/en.pug
b/client/src/translations/welcome/en.pug
index
bbc5edf
..
4bb53b3
100644
(file)
--- a/
client/src/translations/welcome/en.pug
+++ b/
client/src/translations/welcome/en.pug
@@
-1,7
+1,11
@@
h3 Welcome to v[ariant]chess.club!
p A place to play chess variants.
img(src="/images/Hexagonal_chess.svg")
h3 Welcome to v[ariant]chess.club!
p A place to play chess variants.
img(src="/images/Hexagonal_chess.svg")
-p A variant is a change in the usual rules :
+-
+ var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
+ "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
+p#credits Image credit: #[a(href=wikipediaUrl) Wikipedia]
+p A variant is a change in the usual rules:
ul
li different pieces movements, or
li different chessboards (as on the image), or
ul
li different pieces movements, or
li different chessboards (as on the image), or
@@
-12,9
+16,3
@@
a(href="https://www.chessvariants.com/why.html") Why should I play them ?!
h3 Notes (non-negotiable ;) )
p No ELO rating on this website.
p Games start with an assymetric random setup.
h3 Notes (non-negotiable ;) )
p No ELO rating on this website.
p Games start with an assymetric random setup.
-p#disableMsg.clickable(onClick="localStorage.setItem('welcomed',true)")
- | Close and show no more
--
- var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
- "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
-p.smallfont Image credit: #[a(href=wikipediaUrl) Wikipedia]
diff --git
a/client/src/translations/welcome/es.pug
b/client/src/translations/welcome/es.pug
index
c3a292e
..
56f1ac4
100644
(file)
--- a/
client/src/translations/welcome/es.pug
+++ b/
client/src/translations/welcome/es.pug
@@
-1,6
+1,10
@@
h3 ¡ Bienvenido a v[ariant]chess.club !
p Un sitio donde jugar variantes del juego de ajedrez.
img(src="/images/Hexagonal_chess.svg")
h3 ¡ Bienvenido a v[ariant]chess.club !
p Un sitio donde jugar variantes del juego de ajedrez.
img(src="/images/Hexagonal_chess.svg")
+-
+ var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
+ "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
+p#credits Credito de imagen : #[a(href=wikipediaUrl) Wikipedia]
p Una variante es un cambio de las reglas habituales :
ul
li diferentes desplazamientos de piezas, o
p Una variante es un cambio de las reglas habituales :
ul
li diferentes desplazamientos de piezas, o
@@
-12,9
+16,3
@@
a(href="https://www.chessvariants.com/why.html") Pero por qué jugar esto ?!
h3 Notas (no negociables ;) )
p No hay clasificación ELO en el sitio.
p Las partidas comienzan con una posición aleatoria asimétrica.
h3 Notas (no negociables ;) )
p No hay clasificación ELO en el sitio.
p Las partidas comienzan con una posición aleatoria asimétrica.
-p#disableMsg.clickable(onClick="localStorage.setItem('welcomed',true)")
- | Cerrar y no mostrar más
--
- var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
- "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
-p.smallfont Credito de imagen : #[a(href=wikipediaUrl) Wikipedia]
diff --git
a/client/src/translations/welcome/fr.pug
b/client/src/translations/welcome/fr.pug
index
84fd0c4
..
4a5a387
100644
(file)
--- a/
client/src/translations/welcome/fr.pug
+++ b/
client/src/translations/welcome/fr.pug
@@
-1,6
+1,10
@@
h3 Bienvenue sur v[ariant]chess.club !
p Un site où jouer à des variantes du jeu d'échecs.
img(src="/images/Hexagonal_chess.svg")
h3 Bienvenue sur v[ariant]chess.club !
p Un site où jouer à des variantes du jeu d'échecs.
img(src="/images/Hexagonal_chess.svg")
+-
+ var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
+ "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
+p#credits Crédit image : #[a(href=wikipediaUrl) Wikipedia]
p Une variante est une modification des règles usuelles :
ul
li différents déplacements de pièces, ou
p Une variante est une modification des règles usuelles :
ul
li différents déplacements de pièces, ou
@@
-12,9
+16,3
@@
a(href="https://www.chessvariants.com/why.html") Mais pourquoi jouer à ça ?!
h3 Notes (non négociables ;) )
p Aucun classement ELO sur le site.
p Les parties démarrent avec une position aléatoire asymétrique.
h3 Notes (non négociables ;) )
p Aucun classement ELO sur le site.
p Les parties démarrent avec une position aléatoire asymétrique.
-p#disableMsg.clickable(@click="closeAndDisable")
- | Fermer et ne plus montrer
--
- var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
- "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
-p.smallfont Crédit image : #[a(href=wikipediaUrl) Wikipedia]
diff --git
a/client/src/views/About.vue
b/client/src/views/About.vue
index
47a740d
..
a685f3c
100644
(file)
--- a/
client/src/views/About.vue
+++ b/
client/src/views/About.vue
@@
-7,7
+7,6
@@
main
<script>
import { store } from "@/store";
<script>
import { store } from "@/store";
-
export default {
name: 'my-about',
computed: {
export default {
name: 'my-about',
computed: {
diff --git
a/client/src/views/Analyse.vue
b/client/src/views/Analyse.vue
index
a4bdec2
..
2f68cde
100644
(file)
--- a/
client/src/views/Analyse.vue
+++ b/
client/src/views/Analyse.vue
@@
-4,7
+4,7
@@
main
.col-sm-12
#fenDiv
input#fen(v-model="curFen" @input="adjustFenSize")
.col-sm-12
#fenDiv
input#fen(v-model="curFen" @input="adjustFenSize")
- button(@click="gotoFen") {{ st.tr["Go"] }}
+ button(@click="gotoFen
()
") {{ st.tr["Go"] }}
BaseGame(:game="game" :vr="vr" ref="basegame")
</template>
BaseGame(:game="game" :vr="vr" ref="basegame")
</template>
@@
-12,7
+12,6
@@
main
import BaseGame from "@/components/BaseGame.vue";
import { store } from "@/store";
import { ArrayFun } from "@/utils/array";
import BaseGame from "@/components/BaseGame.vue";
import { store } from "@/store";
import { ArrayFun } from "@/utils/array";
-
export default {
name: 'my-analyse',
components: {
export default {
name: 'my-analyse',
components: {
diff --git
a/client/src/views/Auth.vue
b/client/src/views/Auth.vue
index
f892fd5
..
a750b3e
100644
(file)
--- a/
client/src/views/Auth.vue
+++ b/
client/src/views/Auth.vue
@@
-9,7
+9,6
@@
main
<script>
import { store } from "@/store";
import { ajax } from "@/utils/ajax";
<script>
import { store } from "@/store";
import { ajax } from "@/utils/ajax";
-
export default {
name: 'my-auth',
data: function() {
export default {
name: 'my-auth',
data: function() {
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
a61655a
..
dc6b817
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-1,6
+1,6
@@
<template lang="pug">
main
<template lang="pug">
main
- input#modalChat.modal(type="checkbox" @click="resetChatColor")
+ input#modalChat.modal(type="checkbox" @click="resetChatColor
()
")
div#chatWrap(role="dialog" data-checkbox="modalChat" aria-labelledby="inputChat")
#chat.card
label.modal-close(for="modalChat")
div#chatWrap(role="dialog" data-checkbox="modalChat" aria-labelledby="inputChat")
#chat.card
label.modal-close(for="modalChat")
@@
-17,10
+17,10
@@
main
span.variant-info {{ game.vname }}
button#chatBtn(onClick="doClick('modalChat')") Chat
#actions(v-if="game.score=='*'")
span.variant-info {{ game.vname }}
button#chatBtn(onClick="doClick('modalChat')") Chat
#actions(v-if="game.score=='*'")
- button(@click="clickDraw" :class="{['draw-' + drawOffer]: true}")
+ button(@click="clickDraw
()
" :class="{['draw-' + drawOffer]: true}")
| {{ st.tr["Draw"] }}
| {{ st.tr["Draw"] }}
- button(v-if="!!game.mycolor" @click="abortGame") {{ st.tr["Abort"] }}
- button(v-if="!!game.mycolor" @click="resign") {{ st.tr["Resign"] }}
+ button(v-if="!!game.mycolor" @click="abortGame
()
") {{ st.tr["Abort"] }}
+ button(v-if="!!game.mycolor" @click="resign
()
") {{ st.tr["Resign"] }}
#playersInfo
p
span.name(:class="{connected: isConnected(0)}")
#playersInfo
p
span.name(:class="{connected: isConnected(0)}")
diff --git
a/client/src/views/Hall.vue
b/client/src/views/Hall.vue
index
9c06c4b
..
42fd476
100644
(file)
--- a/
client/src/views/Hall.vue
+++ b/
client/src/views/Hall.vue
@@
-31,7
+31,7
@@
main
fieldset(v-if="st.user.id > 0 && newchallenge.to.length > 0")
label(for="inputFen") FEN
input#inputFen(type="text" v-model="newchallenge.fen")
fieldset(v-if="st.user.id > 0 && newchallenge.to.length > 0")
label(for="inputFen") FEN
input#inputFen(type="text" v-model="newchallenge.fen")
- button(@click="newChallenge") {{ st.tr["Send challenge"] }}
+ button(@click="newChallenge
()
") {{ st.tr["Send challenge"] }}
.row
.col-sm-12
button#newGame(onClick="doClick('modalNewgame')") {{ st.tr["New game"] }}
.row
.col-sm-12
button#newGame(onClick="doClick('modalNewgame')") {{ st.tr["New game"] }}
@@
-39,14
+39,14
@@
main
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
div
.button-group
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
div
.button-group
- button(@click="
(e) => setDisplay('c','live',e
)" class="active")
+ button(@click="
setDisplay('c','live',$event
)" class="active")
| {{ st.tr["Live challenges"] }}
| {{ st.tr["Live challenges"] }}
- button(@click="
(e) => setDisplay('c','corr',e
)")
+ button(@click="
setDisplay('c','corr',$event
)")
| {{ st.tr["Correspondance challenges"] }}
ChallengeList(v-show="cdisplay=='live'"
| {{ st.tr["Correspondance challenges"] }}
ChallengeList(v-show="cdisplay=='live'"
- :challenges="filterChallenges('live')" @click-challenge="clickChallenge")
+ :challenges="filterChallenges('live')" @click-challenge="clickChallenge
()
")
ChallengeList(v-show="cdisplay=='corr'"
ChallengeList(v-show="cdisplay=='corr'"
- :challenges="filterChallenges('corr')" @click-challenge="clickChallenge")
+ :challenges="filterChallenges('corr')" @click-challenge="clickChallenge
()
")
#people
h3.text-center {{ st.tr["Who's there?"] }}
#players
#people
h3.text-center {{ st.tr["Who's there?"] }}
#players
@@
-64,9
+64,9
@@
main
.clearer
div
.button-group
.clearer
div
.button-group
- button(@click="
(e) => setDisplay('g','live',e
)" class="active")
+ button(@click="
setDisplay('g','live',$event
)" class="active")
| {{ st.tr["Live games"] }}
| {{ st.tr["Live games"] }}
- button(@click="
(e) => setDisplay('g','corr',e
)")
+ button(@click="
setDisplay('g','corr',$event
)")
| {{ st.tr["Correspondance games"] }}
GameList(v-show="gdisplay=='live'" :games="filterGames('live')"
@show-game="showGame")
| {{ st.tr["Correspondance games"] }}
GameList(v-show="gdisplay=='live'" :games="filterGames('live')"
@show-game="showGame")
diff --git
a/client/src/views/Logout.vue
b/client/src/views/Logout.vue
index
61259d5
..
89f9a39
100644
(file)
--- a/
client/src/views/Logout.vue
+++ b/
client/src/views/Logout.vue
@@
-9,7
+9,6
@@
main
<script>
import { store } from "@/store";
import { ajax } from "@/utils/ajax";
<script>
import { store } from "@/store";
import { ajax } from "@/utils/ajax";
-
export default {
name: 'my-logout',
data: function() {
export default {
name: 'my-logout',
data: function() {
diff --git
a/client/src/views/MyGames.vue
b/client/src/views/MyGames.vue
index
6ed2c7f
..
9e58cfd
100644
(file)
--- a/
client/src/views/MyGames.vue
+++ b/
client/src/views/MyGames.vue
@@
-16,7
+16,6
@@
import { store } from "@/store";
import { GameStorage } from "@/utils/gameStorage";
import { ajax } from "@/utils/ajax";
import GameList from "@/components/GameList.vue";
import { GameStorage } from "@/utils/gameStorage";
import { ajax } from "@/utils/ajax";
import GameList from "@/components/GameList.vue";
-
export default {
name: "my-games",
components: {
export default {
name: "my-games",
components: {
diff --git
a/client/src/views/Rules.vue
b/client/src/views/Rules.vue
index
3339111
..
dbc6798
100644
(file)
--- a/
client/src/views/Rules.vue
+++ b/
client/src/views/Rules.vue
@@
-3,15
+3,15
@@
main
.row
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
.button-group
.row
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
.button-group
- button(@click="clickReadRules") {{ st.tr["Rules"] }}
- button(v-show="!gameInProgress" @click="
() =>
startGame('auto')")
+ button(@click="clickReadRules
()
") {{ st.tr["Rules"] }}
+ button(v-show="!gameInProgress" @click="startGame('auto')")
| {{ st.tr["Example game"] }}
| {{ st.tr["Example game"] }}
- button(v-show="!gameInProgress" @click="
() =>
startGame('versus')")
+ button(v-show="!gameInProgress" @click="startGame('versus')")
| {{ st.tr["Practice"] }}
| {{ st.tr["Practice"] }}
- button(v-show="gameInProgress" @click="
() =>
stopGame()")
+ button(v-show="gameInProgress" @click="stopGame()")
| {{ st.tr["Stop game"] }}
button(v-if="display=='rules' && gameInfo.vname!='Dark'"
| {{ st.tr["Stop game"] }}
button(v-if="display=='rules' && gameInfo.vname!='Dark'"
- @click="gotoAnalyze")
+ @click="gotoAnalyze
()
")
| {{ st.tr["Analyse"] }}
.section-content(v-show="display=='rules'" v-html="content")
ComputerGame(v-show="display=='computer'" :game-info="gameInfo"
| {{ st.tr["Analyse"] }}
.section-content(v-show="display=='rules'" v-html="content")
ComputerGame(v-show="display=='computer'" :game-info="gameInfo"
@@
-22,7
+22,6
@@
main
import ComputerGame from "@/components/ComputerGame.vue";
import { store } from "@/store";
import { getDiagram } from "@/utils/printDiagram";
import ComputerGame from "@/components/ComputerGame.vue";
import { store } from "@/store";
import { getDiagram } from "@/utils/printDiagram";
-
export default {
name: 'my-rules',
components: {
export default {
name: 'my-rules',
components: {