const game_element = document.createElement("tr");
game_element.classList.add("game-summary");
+ if (game.status.completed) {
+ game_element.classList.add("game-summary-completed");
+ }
const id = document.createElement("td");
id.innerText = "#" + game.id;
texas_hold_em_text.innerText = "Texas Hold 'em";
texas_hold_em.append(texas_hold_em_img);
texas_hold_em.append(texas_hold_em_text);
- texas_hold_em.onclick = () => this.send({type: "JoinLobby", filter: "format: TexasHoldEm and completed: false"});
+ texas_hold_em.onclick = () => this.send({type: "JoinLobby", filter: "format: TexasHoldEm and created_in_last: 2:00:00"});
menu_container.append(texas_hold_em);
const knock_out_whist = document.createElement("div");
knock_out_whist_text.innerText = "Knock-Out Whist";
knock_out_whist.append(knock_out_whist_img);
knock_out_whist.append(knock_out_whist_text);
- knock_out_whist.onclick = () => this.send({type: "JoinLobby", filter: "format: KnockOutWhist and completed: false"});
+ knock_out_whist.onclick = () => this.send({type: "JoinLobby", filter: "format: KnockOutWhist and created_in_last: 2:00:00"});
menu_container.append(knock_out_whist);
const chatroom = document.createElement("div");
chatroom_text.innerText = "Chatroom";
chatroom.append(chatroom_img);
chatroom.append(chatroom_text);
- chatroom.onclick = () => this.send({type: "JoinLobby", filter: "format: Chatroom"});
+ chatroom.onclick = () => this.send({type: "JoinLobby", filter: "format: Chatroom and created_in_last: 2:00:00"});
menu_container.append(chatroom);
this.container.append(menu_container);