Hide the upcoming cards option in the lobby page if there are none

This commit is contained in:
Andrio Celos 2023-11-24 14:04:35 +11:00
parent a69d67556f
commit eadd999bcb
2 changed files with 5 additions and 3 deletions

View File

@ -49,8 +49,10 @@ function onInitialise(callback: () => void) {
function initCardDatabase(cards: Card[]) {
deckEditInitCardDatabase(cards);
if (!cards.find(c => c.number < 0))
if (!cards.find(c => c.number < 0)) {
gameSetupAllowUpcomingCardsBox.parentElement!.hidden = true;
lobbyAllowUpcomingCardsBox.parentElement!.hidden = true;
}
}
function initStageDatabase(stages: Stage[]) {
preGameInitStageDatabase(stages);
@ -260,7 +262,7 @@ function setupWebSocket(gameID: string) {
enterGameTimeout = null;
}
setLoadingMessage(null);
if (!e.data) {
if (!payload.data) {
webSocket.close();
alert('The game was not found.');
} else {

View File

@ -249,7 +249,7 @@ footer {
margin-right: 1.5em;
}
#lobbyPage label {
#lobbyPage label:not([hidden]) {
display: block;
}