diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsx index 10bbfae..419dd85 100644 --- a/client/src/app/layout.tsx +++ b/client/src/app/layout.tsx @@ -22,7 +22,15 @@ export const metadata = { follow: false, nocache: true, noarchive: true - } + }, + icons: { + icon: [ + { type: "image/png", sizes: "32x32", url: "/favicon-32x32.png" }, + { type: "image/png", sizes: "16x16", url: "/favicon-16x16.png" } + ], + apple: { url: "/apple-touch-icon.png", sizes: "180x180" } + }, + manifest: "/site.webmanifest" }; export default function RootLayout({ children }: { children: React.ReactNode }) { diff --git a/client/src/components/Header.tsx b/client/src/components/Header.tsx index 6fb3a18..fe20da4 100644 --- a/client/src/components/Header.tsx +++ b/client/src/components/Header.tsx @@ -1,15 +1,18 @@ import { IconUser } from "@tabler/icons-react"; import Link from "next/link"; import ThemeToggle from "./ThemeToggle"; +import Image from "next/image"; +import icon from "../../public/images/chessu_icon.svg"; export default function Header() { return (
-
+
+ chessu icon chessu
diff --git a/server/src/socket/game.socket.ts b/server/src/socket/game.socket.ts index fd4d81e..5f4c245 100644 --- a/server/src/socket/game.socket.ts +++ b/server/src/socket/game.socket.ts @@ -149,6 +149,9 @@ export async function claimAbandoned(this: Socket, type: "win" | "draw") { }; io.to(game.code as string).emit("gameOver", gameOver); + + if (game.timeout) clearTimeout(game.timeout); + activeGames.splice(activeGames.indexOf(game), 1); } export async function getLatestGame(this: Socket) { @@ -205,6 +208,9 @@ export async function sendMove(this: Socket, m: { from: string; to: string; prom const { id } = (await GameModel.save(game)) as Game; // save game to db game.id = id; io.to(game.code as string).emit("gameOver", { reason, winnerName, winnerSide, id }); + + if (game.timeout) clearTimeout(game.timeout); + activeGames.splice(activeGames.indexOf(game), 1); } } else { throw new Error("invalid move");