use new created_in_last filter
authorGeoffrey Allott <geoffrey@allott.email>
Sat, 27 May 2023 17:03:35 +0000 (18:03 +0100)
committerGeoffrey Allott <geoffrey@allott.email>
Sat, 27 May 2023 17:03:35 +0000 (18:03 +0100)
site/modules/gamelist.js
site/modules/mainmenu.js
site/style/game-list.css

index af118a3cfbd1b42802825ce36512ee397f5c4951..17246302b38aa67d037b7d72d33799d91948996b 100644 (file)
@@ -57,6 +57,9 @@ export class GameList {
 
         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;
index f65ea23359fc415a8e2f3946bca71279730ae20a..4c75b8e088c1717f15d360562559ea7eec31f622 100644 (file)
@@ -16,7 +16,7 @@ export class MainMenu {
         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");
@@ -27,7 +27,7 @@ export class MainMenu {
         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");
@@ -38,7 +38,7 @@ export class MainMenu {
         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);
index b0c88faeaf0317cd4c555f4ba5a5f32ac8adb603..95b79a51acfe38fb38e6977e961585aae8b58da9 100644 (file)
     background-color: #ffffff;
 }
 
+.game-summary-completed {
+    background-color: gold;
+    color: grey;
+    font-style: italic;
+}
+
 .game-summary:hover {
     background-color: #dfefff;
 }