Visual enhancements

Includes making the background better.
This commit is contained in:
Andrio Celos
2023-08-13 16:45:12 +10:00
parent 1acfa7937d
commit 91044db4c1
3 changed files with 59 additions and 14 deletions

View File

@@ -931,7 +931,7 @@ board.onhighlightchange = dScores => {
};
timeLabel.ontimeout = () => {
if (currentGame == null) return;
if (currentGame == null || !canPlay) return;
if (currentGame.turnNumber == 0) {
let req = new XMLHttpRequest();
req.open('POST', `${config.apiBaseUrl}/games/${currentGame!.id}/redraw`);

View File

@@ -99,10 +99,13 @@ class PlayerBar {
this.pointsDeltaElement.hidden = true;
else {
this.pointsDeltaElement.hidden = false;
if (value > 0)
if (value > 0) {
this.pointsDeltaElement.innerText = `+${value}`;
else
this.pointsDeltaElement.classList.remove('minus');
} else {
this.pointsDeltaElement.innerText = value.toString();
this.pointsDeltaElement.classList.add('minus');
}
}
}