Commit graph

581 commits

Author SHA1 Message Date
bgoulard
7ec1b05ca4 wip 2026-01-14 17:05:45 +01:00
NigeParis
837361ea80 Added F1 and F2 toggle chat window on and off 2026-01-14 16:31:30 +01:00
NigeParis
c623019fe3 Clean up 2026-01-14 16:31:30 +01:00
NigeParis
308818fd74 WIP progess f1 button when changing login with refresh 2026-01-14 16:31:30 +01:00
Maieul BOYER
63549752e8 chore(deps/openapi): updated all
Updated openapi and verified that no unused dependency still remains
2026-01-14 16:26:34 +01:00
Maieul BOYER
4cde1b744f feat(ttt): cleaned up the frontend a bit 2026-01-14 16:12:28 +01:00
Maieul BOYER
8e6ff3aedc feat(tour): added tournament broadcast 2026-01-14 15:59:55 +01:00
Raphaël
eccc763644 ci(docker): typo in workflow step name for .env file 2026-01-14 15:34:49 +01:00
Maieul BOYER
ae6702ccbe feat(devops): added .dev to .gitignore 2026-01-14 15:16:51 +01:00
Maieul BOYER
ac2e3669ca feat(devops): tried to fix ci 2026-01-14 15:16:51 +01:00
Maieul BOYER
d0e787e2c7 feat(devops): removed stuff and added jwt 2026-01-14 15:16:51 +01:00
NigeParis
d9a68771a6 Fix flicker f1 call on chat box + fix button Aless 2026-01-14 14:10:44 +01:00
NigeParis
85065d8bb3 Chat box can be called from F1 and buttons for Games History now in another look 2026-01-14 13:26:07 +01:00
bgoulard
46113553a1 fix, chat page always set ttile over pages as it's now an overlay 2026-01-13 18:54:01 +01:00
NigeParis
420609bb53 fix error in css 2026-01-13 18:37:55 +01:00
bgoulard
cc8d726e4f smal fix on dot chat 2026-01-13 18:25:15 +01:00
bgoulard
cc674d702b smol fix 2026-01-13 18:25:15 +01:00
apetitco
0ba95614b0 bit of cleaning 2026-01-13 18:15:42 +01:00
apetitco
a4aa3291cd Changed toaster messages for queue joining and leaving actions, removed toast that displays updates about the queue. 2026-01-13 18:15:42 +01:00
NigeParis
8b2a35dcce Added message dot 2026-01-13 18:11:05 +01:00
bgoulard
9d6bb0e583 camel case fixup 2026-01-13 18:07:52 +01:00
bgoulard
4f6aca819f fix up html order elements + end-screen 2026-01-13 18:07:52 +01:00
bgoulard
7ffb3d8ef4 unified front for games done 2026-01-13 18:07:52 +01:00
apetitco
77f24de84d (tic-tac-toe): No longer letting old match information displayed once game is finished 2026-01-13 17:20:44 +01:00
Maieul BOYER
52746f8a7f properly dequeue user and reflect that on frontend 2026-01-13 17:20:00 +01:00
Maieul BOYER
06fa768c84 fixes(tournament): tournament now no long blocks you and you get removed from queue when joining a tournament 2026-01-13 17:20:00 +01:00
Maieul BOYER
6fa846f1e2 catching global exceptions 2026-01-13 17:10:28 +01:00
Maieul BOYER
30540bfe92 auth reload and better tour handling 2026-01-13 17:02:21 +01:00
apetitco
deb391807a (tic-tac-toe): Added history button to check player's tic-tac-toe matches history 2026-01-13 16:47:39 +01:00
G.C.L. Baptiste
5eec958663
Merge pull request #152 from Maix0/feat/ttt/cleanboard_endgame
Clearing board on game end
2026-01-13 16:42:43 +01:00
apetitco
f83ae5ce71 (tic-tac-toe): Clearing board on game end. 2026-01-13 16:33:49 +01:00
NigeParis
ca1865b850 Modification win.loc to navigateTO() 2026-01-13 15:51:47 +01:00
NigeParis
b49641d71c history games now in chat and profil 2026-01-13 15:51:47 +01:00
NigeParis
2e87cb12c1 history games now in chat and profil 2026-01-13 15:51:47 +01:00
Maieul BOYER
9e431e9c6c fixes: cleanup things and added a title on every page 2026-01-13 15:50:44 +01:00
Maieul BOYER
a1a896daf2 fix(msg): show correct messages 2026-01-13 15:29:46 +01:00
Maieul BOYER
aca2dbd070 feat(tour): added tournament history page :D 2026-01-13 14:17:51 +01:00
NigeParis
75f3c2a769 Added quitChat in Pong.ts to go to UGAME 2026-01-13 13:00:33 +01:00
NigeParis
7e644fe658 Fixed in / out chat notification system info 2026-01-13 13:00:33 +01:00
NigeParis
2e422eee2a Blockage u-Game from user 2026-01-13 13:00:33 +01:00
NigeParis
432fd849b8 WIP copy U Game link to sender 2026-01-13 13:00:33 +01:00
Maieul BOYER
ed2885f19d removed console.log 2026-01-12 17:10:34 +01:00
Maieul BOYER
43e3b9af26 feat(tournament): better frontend and database handling 2026-01-12 17:10:34 +01:00
Alessandro Petitcollin
ca618d64ca Now using variable to define time before result message disappears to avoid magic numbers in this case. 2026-01-12 17:02:30 +01:00
Alessandro Petitcollin
35a7438e83 Instead of toast, result message is now displayed on top of tic-tac-toe grid and disappear after a timeout period.
# Conflicts:
#	frontend/src/pages/ttt/ttt.ts

diff --git c/frontend/src/pages/ttt/ttt.html i/frontend/src/pages/ttt/ttt.html
index 82b0f8f..0ea49e1 100644
--- c/frontend/src/pages/ttt/ttt.html
+++ i/frontend/src/pages/ttt/ttt.html
@@ -1,6 +1,6 @@
 <div class="displaybox">
-    <div id="mainbox" class="mainboxDisplay">
-        <button id="JoinQueueBtn" class="btn-style absolute top-4 right-6">Join Queue</button>
+    <div class="mainboxDisplay" id="mainbox">
+        <button class="btn-style absolute top-4 right-6" id="JoinQueueBtn">Join Queue</button>
         <h1 class="text-3xl font-bold text-gray-800">
             Tic-tac-toe Box<span id="t-username"></span>
         </h1><br>
@@ -14,7 +14,7 @@
             </div>

             <div class="text-center text-sm text-gray-800 px-4 whitespace-nowrap">
-                <div id="currentPlayer" class='text-7xl font-bold'></div>
+                <div class='text-7xl font-bold' id="currentPlayer"></div>
                 <div id="currentPlayerTimer">Waiting for match...</div>
             </div>

@@ -27,17 +27,21 @@
             </div>
         </div>
         <div class="grid-box mt-2">
-            <div class="grid-layout">
-                <div id="cell1" class="ttt-cell"></div>
-                <div id="cell2" class="ttt-cell"></div>
-                <div id="cell3" class="ttt-cell"></div>
-                <div id="cell4" class="ttt-cell"></div>
-                <div id="cell5" class="ttt-cell"></div>
-                <div id="cell6" class="ttt-cell"></div>
-                <div id="cell7" class="ttt-cell"></div>
-                <div id="cell8" class="ttt-cell"></div>
-                <div id="cell9" class="ttt-cell"></div>
+            <div class="grid-layout relative rounded-lg overflow-hidden">
+                <div class="absolute inset-0 flex flex-col items-center justify-center z-10 bg-gray-900/85 text-white hidden"
+                     id="ttt-end-screen">
+                    outcome
+                </div>
+                <div class="ttt-cell" id="cell1"></div>
+                <div class="ttt-cell" id="cell2"></div>
+                <div class="ttt-cell" id="cell3"></div>
+                <div class="ttt-cell" id="cell4"></div>
+                <div class="ttt-cell" id="cell5"></div>
+                <div class="ttt-cell" id="cell6"></div>
+                <div class="ttt-cell" id="cell7"></div>
+                <div class="ttt-cell" id="cell8"></div>
+                <div class="ttt-cell" id="cell9"></div>
             </div>
-        </div>
+        </div>
     </div>
 </div>
\ No newline at end of file
diff --git c/frontend/src/pages/ttt/ttt.ts i/frontend/src/pages/ttt/ttt.ts
index 2c22add..a111624 100644
--- c/frontend/src/pages/ttt/ttt.ts
+++ i/frontend/src/pages/ttt/ttt.ts
@@ -1,7 +1,7 @@
 import "./ttt.css"
 import {addRoute, type RouteHandlerReturn} from "@app/routing";
 import tttPage from "./ttt.html?raw";
-import {showError, showInfo, showSuccess, showWarn} from "@app/toast";
+import {showError, showInfo} from "@app/toast";
 import {io} from "socket.io-client";
 import type {CSocket as Socket, GameUpdate} from "./socket";
 import {updateUser} from "@app/auth";
@@ -57,7 +57,8 @@ async function handleTTT(): Promise<RouteHandlerReturn> {
             const currentPlayerIndicator = document.getElementById("currentPlayer");
             const joinQueueBtn = document.getElementById("JoinQueueBtn");
             const currentPlayerTimer = document.getElementById("currentPlayerTimer")
-            if (!userXString || !userOString || !currentPlayerIndicator || !joinQueueBtn || !currentPlayerTimer) {
+            const result_message = document.getElementById("ttt-end-screen");
+            if (!userXString || !userOString || !currentPlayerIndicator || !joinQueueBtn || !currentPlayerTimer || !result_message) {
                 return showError('fatal error');
             }

@@ -128,9 +129,12 @@ async function handleTTT(): Promise<RouteHandlerReturn> {
             };

             const makeEnd = (type: 'win' | 'conceded' | 'draw', player: 'X' | 'O') => {
-                // TODO: Enhance the draw notification
                 if (type === 'draw') {
-                    showWarn('It\'s a draw !')
+                    result_message.innerText = "It's a draw! :/";
+                    result_message.classList.remove("hidden");
+                    setTimeout(() => {
+                        result_message.classList.add("hidden");
+                    }, 3 * 1000);
                 }

                 if (type === 'win') {
@@ -145,11 +149,19 @@ async function handleTTT(): Promise<RouteHandlerReturn> {
                         default:
                             return;
                     }
-                    // TODO: Enhance the win/loss notification
-                    if (youWin)
-                        showSuccess('You won the game !');
-                    else
-                        showError('You lost the game :(');
+                    if (youWin) {
+                        result_message.innerText = "You won the game! :)";
+                        result_message.classList.remove("hidden");
+                        setTimeout(() => {
+                            result_message.classList.add("hidden");
+                        }, 3 * 1000);
+                    } else {
+                        result_message.innerText = "You lost the game! :(";
+                        result_message.classList.remove("hidden");
+                        setTimeout(() => {
+                            result_message.classList.add("hidden");
+                        }, 3 * 1000);
+                    }
                 }
             };
2026-01-12 17:02:30 +01:00
Alessandro Petitcollin
1c6a513e4f result of make npm@update && make npm@openapi 2026-01-12 17:02:30 +01:00
Alessandro Petitcollin
830d733f1b Initial commit 2026-01-12 17:02:30 +01:00
bgoulard
19cae8ae63 fix integration with caht service 2026-01-12 15:09:54 +01:00
bgoulard
fd572707ff wip 2026-01-12 15:09:54 +01:00
bgoulard
152d5e9578 added join game via url. 2026-01-12 15:09:54 +01:00