div#infoDiv(role="dialog" data-checkbox="modalInfo")
.card.text-center
label.modal-close(for="modalInfo")
- h3.section
p(v-html="infoMessage")
input#modalNewgame.modal(type="checkbox")
div#newgameDiv(role="dialog" data-checkbox="modalNewgame")
"#/game/" + gameInfo.id + "</a>";
let modalBox = document.getElementById("modalInfo");
modalBox.checked = true;
- setTimeout(() => { modalBox.checked = false; }, 3000);
}
break;
}
margin: 10px auto 5px auto
#infoDiv > .card
- max-width: 370px
+ padding: 15px 0
+ max-width: 430px
#newgameDiv > .card
max-width: 767px
+## V1:
#!/bin/sh
# NOTE: the ssh part is not required if git repo and vchess are on the same server
ssh user@server -t 'cd /path/to/vchess/client && git pull && npm run build'
+
+## V2:
+#!/bin/sh
+cd /path/to/vchess || exit
+# See https://stackoverflow.com/questions/4043609/getting-fatal-not-a-git-repository-when-using-post-update-hook-to-execut
+unset GIT_DIR
+git pull
+clientLines=`git diff-tree --no-commit-id --name-only -r HEAD | grep client | wc -l`
+if [ $clientLines -ne 0 ]; then
+ cd client
+ npm run build
+fi
+# TOOD: also should restart the service if server code changes
checkGameInfo: function(g) {
if (!g.vid.toString().match(/^[0-9]+$/))
return "Wrong variant ID";
- if (!g.vname.match(/^[a-zA-Z0-9]+$/))
- return "Wrong variant name";
if (!g.cadence.match(/^[0-9dhms +]+$/))
return "Wrong characters in time control";
if (!g.fen.match(/^[a-zA-Z0-9, /-]*$/))
{
doKill(pg);
disconnectFromOtherConnexion(pg, "disconnect");
- if (pg.indexOf("/game/") >= 0)
+ if (pg.indexOf("/game/") >= 0 && !!clients["/"])
disconnectFromOtherConnexion("/", "gdisconnect", {page:pg});
}
});