fix : bump packages versions
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
"prettier/prettier": ["error", {"endOfLine": "auto"}],
|
"prettier/prettier": ["error", {"endOfLine": "auto"}],
|
||||||
"require-jsdoc": "off",
|
"require-jsdoc": "off",
|
||||||
"@typescript-eslint/no-unused-vars": "error",
|
"@typescript-eslint/no-unused-vars": "error",
|
||||||
"react/no-unescaped-entities": 0
|
"react/no-unescaped-entities": 0,
|
||||||
|
"@typescript-eslint/no-deprecated": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1443
package-lock.json
generated
1443
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -35,10 +35,10 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
||||||
"@typescript-eslint/parser": "^8.18.2",
|
"@typescript-eslint/parser": "^8.18.2",
|
||||||
"eslint": "^8.57.1",
|
"eslint": "^8.57.1",
|
||||||
"eslint-config-next": "^13.4.5",
|
"eslint-config-next": "^15.1.3",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.10.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.31.0",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
"typescript": "^5.7.2"
|
"typescript": "^5.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
Grid,
|
Grid2 as Grid,
|
||||||
LinearProgress,
|
LinearProgress,
|
||||||
LinearProgressProps,
|
LinearProgressProps,
|
||||||
Typography,
|
Typography,
|
||||||
@@ -12,21 +12,20 @@ const LinearProgressBar = (
|
|||||||
if (props.value === 0) return null;
|
if (props.value === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item container alignItems="center" justifyContent="center" xs={12}>
|
<Grid container alignItems="center" justifyContent="center" size={12}>
|
||||||
<Typography variant="caption" align="center">
|
<Typography variant="caption" align="center">
|
||||||
{props.label}
|
{props.label}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
width="90%"
|
width="90%"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
wrap="nowrap"
|
wrap="nowrap"
|
||||||
columnGap={2}
|
columnGap={2}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Grid item sx={{ width: "100%" }}>
|
<Grid sx={{ width: "100%" }}>
|
||||||
<LinearProgress
|
<LinearProgress
|
||||||
variant="determinate"
|
variant="determinate"
|
||||||
{...props}
|
{...props}
|
||||||
@@ -46,7 +45,7 @@ const LinearProgressBar = (
|
|||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>
|
<Grid>
|
||||||
<Typography variant="body2" color="text.secondary">{`${Math.round(
|
<Typography variant="body2" color="text.secondary">{`${Math.round(
|
||||||
props.value
|
props.value
|
||||||
)}%`}</Typography>
|
)}%`}</Typography>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { getCapturedPieces, getMaterialDifference } from "@/lib/chess";
|
import { getCapturedPieces, getMaterialDifference } from "@/lib/chess";
|
||||||
import { Color } from "@/types/enums";
|
import { Color } from "@/types/enums";
|
||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { Chess } from "chess.js";
|
import { Chess } from "chess.js";
|
||||||
import { PrimitiveAtom, useAtomValue } from "jotai";
|
import { PrimitiveAtom, useAtomValue } from "jotai";
|
||||||
import { CSSProperties, useMemo } from "react";
|
import { CSSProperties, useMemo } from "react";
|
||||||
@@ -25,7 +25,7 @@ export default function CapturedPieces({ gameAtom, color }: Props) {
|
|||||||
}, [game, color]);
|
}, [game, color]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item container alignItems="end" xs="auto" columnGap={0.6}>
|
<Grid container alignItems="end" columnGap={0.6} size="auto">
|
||||||
{cssProps.map((cssProp, i) => (
|
{cssProps.map((cssProp, i) => (
|
||||||
<span
|
<span
|
||||||
key={i}
|
key={i}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Box, Grid, Typography } from "@mui/material";
|
import { Box, Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { PrimitiveAtom, atom, useAtomValue } from "jotai";
|
import { PrimitiveAtom, atom, useAtomValue } from "jotai";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { getEvaluationBarValue } from "@/lib/chess";
|
import { getEvaluationBarValue } from "@/lib/chess";
|
||||||
@@ -32,7 +32,6 @@ export default function EvaluationBar({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { Chessboard } from "react-chessboard";
|
import { Chessboard } from "react-chessboard";
|
||||||
import { PrimitiveAtom, atom, useAtomValue, useSetAtom } from "jotai";
|
import { PrimitiveAtom, atom, useAtomValue, useSetAtom } from "jotai";
|
||||||
import {
|
import {
|
||||||
@@ -220,7 +220,6 @@ export default function Board({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
@@ -236,21 +235,19 @@ export default function Board({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
rowGap={1}
|
rowGap={1}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
paddingLeft={showEvaluationBar ? 2 : 0}
|
paddingLeft={showEvaluationBar ? 2 : 0}
|
||||||
xs
|
size="grow"
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
columnGap={2}
|
columnGap={2}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{boardOrientation === Color.White ? blackPlayer : whitePlayer}
|
{boardOrientation === Color.White ? blackPlayer : whitePlayer}
|
||||||
@@ -263,12 +260,11 @@ export default function Board({
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
ref={boardRef}
|
ref={boardRef}
|
||||||
xs={12}
|
size={12}
|
||||||
>
|
>
|
||||||
<Chessboard
|
<Chessboard
|
||||||
id={`${boardId}-${canPlay}`}
|
id={`${boardId}-${canPlay}`}
|
||||||
@@ -296,12 +292,11 @@ export default function Board({
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
columnGap={2}
|
columnGap={2}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
{boardOrientation === Color.White ? whitePlayer : blackPlayer}
|
{boardOrientation === Color.White ? whitePlayer : blackPlayer}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, Slider as MuiSlider, Typography } from "@mui/material";
|
import { Grid2 as Grid, Slider as MuiSlider, Typography } from "@mui/material";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
value: number;
|
value: number;
|
||||||
@@ -6,7 +6,7 @@ interface Props {
|
|||||||
min: number;
|
min: number;
|
||||||
max: number;
|
max: number;
|
||||||
label: string;
|
label: string;
|
||||||
xs?: number;
|
size?: number;
|
||||||
marksFilter?: number;
|
marksFilter?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,16 +16,15 @@ export default function Slider({
|
|||||||
label,
|
label,
|
||||||
value,
|
value,
|
||||||
setValue,
|
setValue,
|
||||||
xs,
|
size,
|
||||||
marksFilter = 1,
|
marksFilter = 1,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={xs ?? 11}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
|
size={size ?? 11}
|
||||||
>
|
>
|
||||||
<Typography id={`input-${label}`} textAlign="left" width="100%">
|
<Typography id={`input-${label}`} textAlign="left" width="100%">
|
||||||
{label}
|
{label}
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ import { useEffect, useState } from "react";
|
|||||||
|
|
||||||
export const useScreenSize = () => {
|
export const useScreenSize = () => {
|
||||||
const [screenSize, setScreenSize] = useState({
|
const [screenSize, setScreenSize] = useState({
|
||||||
width: document?.querySelector(".MuiGrid-root")?.clientWidth ?? 500,
|
width: document?.querySelector(".MuiGrid2-root")?.clientWidth ?? 500,
|
||||||
height: window ? window.innerHeight - 120 : 500,
|
height: window ? window.innerHeight - 120 : 500,
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const mainDiv = document?.querySelector(".MuiGrid-root");
|
const mainDiv = document?.querySelector(".MuiGrid2-root");
|
||||||
if (!mainDiv) return;
|
if (!mainDiv) return;
|
||||||
|
|
||||||
const observer = new ResizeObserver(() =>
|
const observer = new ResizeObserver(() =>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import {
|
import {
|
||||||
DataGrid,
|
DataGrid,
|
||||||
@@ -147,18 +147,18 @@ export default function GameDatabase() {
|
|||||||
gap={4}
|
gap={4}
|
||||||
marginTop={6}
|
marginTop={6}
|
||||||
>
|
>
|
||||||
<Grid item container xs={12} justifyContent="center" alignItems="center">
|
<Grid container justifyContent="center" alignItems="center" size={12}>
|
||||||
<LoadGameButton />
|
<LoadGameButton />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid item container xs={12} justifyContent="center" alignItems="center">
|
<Grid container justifyContent="center" alignItems="center" size={12}>
|
||||||
<Typography variant="subtitle2">
|
<Typography variant="subtitle2">
|
||||||
You have {games.length} game{games.length !== 1 && "s"} in your
|
You have {games.length} game{games.length !== 1 && "s"} in your
|
||||||
database
|
database
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid item maxWidth="100%" minWidth="50px">
|
<Grid maxWidth="100%" minWidth="50px">
|
||||||
<DataGrid
|
<DataGrid
|
||||||
aria-label="Games list"
|
aria-label="Games list"
|
||||||
rows={games}
|
rows={games}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Divider,
|
Divider,
|
||||||
Grid,
|
Grid2 as Grid,
|
||||||
Tab,
|
Tab,
|
||||||
Tabs,
|
Tabs,
|
||||||
useMediaQuery,
|
useMediaQuery,
|
||||||
@@ -64,14 +64,11 @@ export default function GameReview() {
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
borderRadius={2}
|
borderRadius={2}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={"secondary.main"}
|
borderColor={"secondary.main"}
|
||||||
xs={12}
|
|
||||||
lg
|
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: "secondary.main",
|
backgroundColor: "secondary.main",
|
||||||
borderColor: "primary.main",
|
borderColor: "primary.main",
|
||||||
@@ -87,6 +84,10 @@ export default function GameReview() {
|
|||||||
display="grid"
|
display="grid"
|
||||||
gridTemplateRows="repeat(4, auto) fit-content(100%)"
|
gridTemplateRows="repeat(4, auto) fit-content(100%)"
|
||||||
marginTop={isLgOrGreater && window.innerHeight > 780 ? 4 : 0}
|
marginTop={isLgOrGreater && window.innerHeight > 780 ? 4 : 0}
|
||||||
|
size={{
|
||||||
|
xs: 12,
|
||||||
|
lg: "grow",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{isLgOrGreater ? (
|
{isLgOrGreater ? (
|
||||||
<PanelHeader key="analysis-panel-header" />
|
<PanelHeader key="analysis-panel-header" />
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import GameInProgress from "@/sections/play/gameInProgress";
|
|||||||
import GameRecap from "@/sections/play/gameRecap";
|
import GameRecap from "@/sections/play/gameRecap";
|
||||||
import GameSettingsButton from "@/sections/play/gameSettings/gameSettingsButton";
|
import GameSettingsButton from "@/sections/play/gameSettings/gameSettingsButton";
|
||||||
import { isGameInProgressAtom } from "@/sections/play/states";
|
import { isGameInProgressAtom } from "@/sections/play/states";
|
||||||
import { Grid } from "@mui/material";
|
import { Grid2 as Grid } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
|
|
||||||
export default function Play() {
|
export default function Play() {
|
||||||
@@ -15,15 +15,16 @@ export default function Play() {
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
marginTop={{ xs: 0, md: "2.5em" }}
|
marginTop={{ xs: 0, md: "2.5em" }}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
borderRadius={2}
|
borderRadius={2}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={"secondary.main"}
|
borderColor={"secondary.main"}
|
||||||
xs={12}
|
size={{
|
||||||
md
|
xs: 12,
|
||||||
|
md: "grow",
|
||||||
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: "secondary.main",
|
backgroundColor: "secondary.main",
|
||||||
borderColor: "primary.main",
|
borderColor: "primary.main",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { gameEvalAtom } from "../../states";
|
import { gameEvalAtom } from "../../states";
|
||||||
|
|
||||||
@@ -9,12 +9,11 @@ export default function Accuracies() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
columnGap={{ xs: "8vw", md: 10 }}
|
columnGap={{ xs: "8vw", md: 10 }}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
align="center"
|
align="center"
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { Grid, GridProps, List, Typography } from "@mui/material";
|
import {
|
||||||
|
Grid2 as Grid,
|
||||||
|
Grid2Props as GridProps,
|
||||||
|
List,
|
||||||
|
Typography,
|
||||||
|
} from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import {
|
import {
|
||||||
boardAtom,
|
boardAtom,
|
||||||
@@ -39,9 +44,8 @@ export default function AnalysisTab(props: GridProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
size={12}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="start"
|
alignItems="start"
|
||||||
height="100%"
|
height="100%"
|
||||||
@@ -60,14 +64,14 @@ export default function AnalysisTab(props: GridProps) {
|
|||||||
<Opening />
|
<Opening />
|
||||||
|
|
||||||
{isGameOver && (
|
{isGameOver && (
|
||||||
<Grid item xs={12}>
|
<Grid size={12}>
|
||||||
<Typography align="center" fontSize="0.9rem">
|
<Typography align="center" fontSize="0.9rem">
|
||||||
Game is over
|
Game is over
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Grid item container xs={12} justifyContent="center" alignItems="center">
|
<Grid container justifyContent="center" alignItems="center" size={12}>
|
||||||
<List sx={{ maxWidth: "95%", padding: 0 }}>
|
<List sx={{ maxWidth: "95%", padding: 0 }}>
|
||||||
{!board.isCheckmate() &&
|
{!board.isCheckmate() &&
|
||||||
engineLines.map((line) => (
|
engineLines.map((line) => (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { boardAtom, currentPositionAtom } from "../../states";
|
import { boardAtom, currentPositionAtom } from "../../states";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
@@ -36,7 +36,7 @@ export default function MoveInfo() {
|
|||||||
: `${bestMoveSan} was the best move`;
|
: `${bestMoveSan} was the best move`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item container columnGap={5} xs={12} justifyContent="center">
|
<Grid container columnGap={5} justifyContent="center" size={12}>
|
||||||
{moveLabel && (
|
{moveLabel && (
|
||||||
<Typography align="center" fontSize="0.9rem">
|
<Typography align="center" fontSize="0.9rem">
|
||||||
{moveLabel}
|
{moveLabel}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useCurrentPosition } from "../../hooks/useCurrentPosition";
|
import { useCurrentPosition } from "../../hooks/useCurrentPosition";
|
||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
|
|
||||||
export default function Opening() {
|
export default function Opening() {
|
||||||
const position = useCurrentPosition();
|
const position = useCurrentPosition();
|
||||||
@@ -8,7 +8,7 @@ export default function Opening() {
|
|||||||
if (!opening) return null;
|
if (!opening) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item xs={12}>
|
<Grid size={12}>
|
||||||
<Typography align="center" fontSize="0.9rem">
|
<Typography align="center" fontSize="0.9rem">
|
||||||
{opening}
|
{opening}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, GridProps } from "@mui/material";
|
import { Grid2 as Grid, Grid2Props as GridProps } from "@mui/material";
|
||||||
import MovesPanel from "./movesPanel";
|
import MovesPanel from "./movesPanel";
|
||||||
import MovesClassificationsRecap from "./movesClassificationsRecap";
|
import MovesClassificationsRecap from "./movesClassificationsRecap";
|
||||||
|
|
||||||
@@ -6,7 +6,6 @@ export default function ClassificationTab(props: GridProps) {
|
|||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="start"
|
alignItems="start"
|
||||||
height="100%"
|
height="100%"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Color, MoveClassification } from "@/types/enums";
|
import { Color, MoveClassification } from "@/types/enums";
|
||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { boardAtom, gameAtom, gameEvalAtom } from "../../../states";
|
import { boardAtom, gameAtom, gameEvalAtom } from "../../../states";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
@@ -71,16 +71,14 @@ export default function ClassificationRow({ classification }: Props) {
|
|||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="space-evenly"
|
justifyContent="space-evenly"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
|
||||||
wrap="nowrap"
|
wrap="nowrap"
|
||||||
color={moveClassificationColors[classification]}
|
color={moveClassificationColors[classification]}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
width={"3rem"}
|
width={"3rem"}
|
||||||
@@ -93,7 +91,6 @@ export default function ClassificationRow({ classification }: Props) {
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="start"
|
justifyContent="start"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
width={"7rem"}
|
width={"7rem"}
|
||||||
@@ -118,7 +115,6 @@ export default function ClassificationRow({ classification }: Props) {
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
width={"3rem"}
|
width={"3rem"}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { usePlayersNames } from "@/hooks/usePlayerNames";
|
import { usePlayersNames } from "@/hooks/usePlayerNames";
|
||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { gameAtom, gameEvalAtom } from "../../../states";
|
import { gameAtom, gameEvalAtom } from "../../../states";
|
||||||
import { MoveClassification } from "@/types/enums";
|
import { MoveClassification } from "@/types/enums";
|
||||||
import ClassificationRow from "./classificationRow";
|
import ClassificationRow from "./classificationRow";
|
||||||
@@ -14,21 +14,19 @@ export default function MovesClassificationsRecap() {
|
|||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
rowGap={1}
|
rowGap={1}
|
||||||
xs={6}
|
|
||||||
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
||||||
maxHeight="100%"
|
maxHeight="100%"
|
||||||
|
size={6}
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
justifyContent="space-evenly"
|
justifyContent="space-evenly"
|
||||||
wrap="nowrap"
|
wrap="nowrap"
|
||||||
xs={12}
|
size={12}
|
||||||
>
|
>
|
||||||
<Typography width="12rem" align="center" noWrap fontSize="0.9rem">
|
<Typography width="12rem" align="center" noWrap fontSize="0.9rem">
|
||||||
{whiteName}
|
{whiteName}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid } from "@mui/material";
|
import { Grid2 as Grid } from "@mui/material";
|
||||||
import MovesLine from "./movesLine";
|
import MovesLine from "./movesLine";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
@@ -40,13 +40,12 @@ export default function MovesPanel() {
|
|||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="start"
|
alignItems="start"
|
||||||
gap={0.8}
|
gap={0.8}
|
||||||
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
||||||
maxHeight="100%"
|
maxHeight="100%"
|
||||||
xs={6}
|
size={6}
|
||||||
id="moves-panel"
|
id="moves-panel"
|
||||||
>
|
>
|
||||||
{gameMoves?.map((moves, idx) => (
|
{gameMoves?.map((moves, idx) => (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MoveClassification } from "@/types/enums";
|
import { MoveClassification } from "@/types/enums";
|
||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { boardAtom, currentPositionAtom, gameAtom } from "../../../states";
|
import { boardAtom, currentPositionAtom, gameAtom } from "../../../states";
|
||||||
@@ -40,7 +40,6 @@ export default function MoveItem({ san, moveClassification, moveIdx }: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MoveClassification } from "@/types/enums";
|
import { MoveClassification } from "@/types/enums";
|
||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import MoveItem from "./moveItem";
|
import MoveItem from "./moveItem";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -11,11 +11,10 @@ export default function MovesLine({ moves, moveNb }: Props) {
|
|||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="space-evenly"
|
justifyContent="space-evenly"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
|
||||||
wrap="nowrap"
|
wrap="nowrap"
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Typography width="2rem" fontSize="0.9rem">
|
<Typography width="2rem" fontSize="0.9rem">
|
||||||
{moveNb}.
|
{moveNb}.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Box, Grid, GridProps } from "@mui/material";
|
import { Box, Grid2 as Grid, Grid2Props as GridProps } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import {
|
import {
|
||||||
Area,
|
Area,
|
||||||
@@ -35,7 +35,6 @@ export default function GraphTab(props: GridProps) {
|
|||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="start"
|
alignItems="start"
|
||||||
height="100%"
|
height="100%"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { gameAtom } from "../states";
|
import { gameAtom } from "../states";
|
||||||
@@ -20,27 +20,26 @@ export default function GamePanel() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={11}
|
|
||||||
justifyContent="space-evenly"
|
justifyContent="space-evenly"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
rowGap={1}
|
rowGap={1}
|
||||||
columnGap={3}
|
columnGap={3}
|
||||||
|
size={11}
|
||||||
>
|
>
|
||||||
<Grid item container xs justifyContent="center" alignItems="center">
|
<Grid container justifyContent="center" alignItems="center" size="grow">
|
||||||
<Typography noWrap fontSize="0.9rem">
|
<Typography noWrap fontSize="0.9rem">
|
||||||
Site : {gameFromUrl?.site || game.header().Site || "?"}
|
Site : {gameFromUrl?.site || game.header().Site || "?"}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid item container xs justifyContent="center" alignItems="center">
|
<Grid container justifyContent="center" alignItems="center" size="grow">
|
||||||
<Typography noWrap fontSize="0.9rem">
|
<Typography noWrap fontSize="0.9rem">
|
||||||
Date : {gameFromUrl?.date || game.header().Date || "?"}
|
Date : {gameFromUrl?.date || game.header().Date || "?"}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid item container xs justifyContent="center" alignItems="center">
|
<Grid container justifyContent="center" alignItems="center" size="grow">
|
||||||
<Typography noWrap fontSize="0.9rem">
|
<Typography noWrap fontSize="0.9rem">
|
||||||
Result : {result}
|
Result : {result}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import { Grid, Typography } from "@mui/material";
|
import { Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import GamePanel from "./gamePanel";
|
import GamePanel from "./gamePanel";
|
||||||
import LoadGame from "./loadGame";
|
import LoadGame from "./loadGame";
|
||||||
import AnalyzeButton from "./analyzeButton";
|
import AnalyzeButton from "./analyzeButton";
|
||||||
@@ -12,20 +12,18 @@ export default function PanelHeader() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
|
||||||
rowGap={2}
|
rowGap={2}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
columnGap={1}
|
columnGap={1}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Icon icon="streamline:clipboard-check" height={24} />
|
<Icon icon="streamline:clipboard-check" height={24} />
|
||||||
|
|
||||||
@@ -35,13 +33,12 @@ export default function PanelHeader() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
rowGap={2}
|
rowGap={2}
|
||||||
columnGap={12}
|
columnGap={12}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<GamePanel />
|
<GamePanel />
|
||||||
<LoadGame />
|
<LoadGame />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import { Grid, IconButton, Tooltip } from "@mui/material";
|
import { Grid2 as Grid, IconButton, Tooltip } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { boardAtom, gameAtom } from "../states";
|
import { boardAtom, gameAtom } from "../states";
|
||||||
import { useChessActions } from "@/hooks/useChessActions";
|
import { useChessActions } from "@/hooks/useChessActions";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Grid, IconButton, Tooltip } from "@mui/material";
|
import { Grid2 as Grid, IconButton, Tooltip } from "@mui/material";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { boardAtom } from "../states";
|
import { boardAtom } from "../states";
|
||||||
@@ -35,7 +35,7 @@ export default function PanelToolBar() {
|
|||||||
}, [undoBoardMove, boardHistory, resetBoard, board]);
|
}, [undoBoardMove, boardHistory, resetBoard, board]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container item justifyContent="center" alignItems="center" xs={12}>
|
<Grid container justifyContent="center" alignItems="center" size={12}>
|
||||||
<FlipBoardButton />
|
<FlipBoardButton />
|
||||||
|
|
||||||
<Tooltip title="Reset board">
|
<Tooltip title="Reset board">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import { Grid, IconButton, Tooltip } from "@mui/material";
|
import { Grid2 as Grid, IconButton, Tooltip } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { boardAtom, gameAtom } from "../states";
|
import { boardAtom, gameAtom } from "../states";
|
||||||
import { useChessActions } from "@/hooks/useChessActions";
|
import { useChessActions } from "@/hooks/useChessActions";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import { Grid, IconButton, Tooltip } from "@mui/material";
|
import { Grid2 as Grid, IconButton, Tooltip } from "@mui/material";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { boardAtom, gameAtom, gameEvalAtom } from "../states";
|
import { boardAtom, gameAtom, gameEvalAtom } from "../states";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Checkbox, FormControlLabel, Grid } from "@mui/material";
|
import { Checkbox, FormControlLabel, Grid2 as Grid } from "@mui/material";
|
||||||
import {
|
import {
|
||||||
showBestMoveArrowAtom,
|
showBestMoveArrowAtom,
|
||||||
showPlayerMoveIconAtom,
|
showPlayerMoveIconAtom,
|
||||||
@@ -18,10 +18,9 @@ export default function ArrowOptions() {
|
|||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="space-evenly"
|
justifyContent="space-evenly"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
size={12}
|
||||||
gap={3}
|
gap={3}
|
||||||
>
|
>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
OutlinedInput,
|
OutlinedInput,
|
||||||
DialogActions,
|
DialogActions,
|
||||||
Typography,
|
Typography,
|
||||||
Grid,
|
Grid2 as Grid,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import {
|
import {
|
||||||
engineNameAtom,
|
engineNameAtom,
|
||||||
@@ -62,14 +62,13 @@ export default function EngineSettingsDialog({ open, onClose }: Props) {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Grid
|
<Grid
|
||||||
marginTop={4}
|
marginTop={4}
|
||||||
item
|
|
||||||
container
|
container
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
|
||||||
rowGap={3}
|
rowGap={3}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Grid item container xs={12} justifyContent="center">
|
<Grid container justifyContent="center" size={12}>
|
||||||
<FormControl variant="outlined">
|
<FormControl variant="outlined">
|
||||||
<InputLabel id="dialog-select-label">Engine</InputLabel>
|
<InputLabel id="dialog-select-label">Engine</InputLabel>
|
||||||
<Select
|
<Select
|
||||||
@@ -111,7 +110,7 @@ export default function EngineSettingsDialog({ open, onClose }: Props) {
|
|||||||
setValue={setMultiPv}
|
setValue={setMultiPv}
|
||||||
min={2}
|
min={2}
|
||||||
max={6}
|
max={6}
|
||||||
xs={6}
|
size={6}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ArrowOptions />
|
<ArrowOptions />
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { ChessComGame } from "@/types/chessCom";
|
|||||||
import {
|
import {
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
FormControl,
|
FormControl,
|
||||||
Grid,
|
Grid2 as Grid,
|
||||||
ListItemButton,
|
ListItemButton,
|
||||||
ListItemText,
|
ListItemText,
|
||||||
TextField,
|
TextField,
|
||||||
@@ -60,12 +60,11 @@ export default function ChessComInput({ pgn, setPgn }: Props) {
|
|||||||
{chessComUsername && (
|
{chessComUsername && (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
xs={12}
|
|
||||||
gap={2}
|
gap={2}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignContent="center"
|
alignContent="center"
|
||||||
minHeight={100}
|
minHeight={100}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
{games.map((game) => (
|
{games.map((game) => (
|
||||||
<ListItemButton
|
<ListItemButton
|
||||||
@@ -85,8 +84,10 @@ export default function ChessComInput({ pgn, setPgn }: Props) {
|
|||||||
)
|
)
|
||||||
.toLocaleString()
|
.toLocaleString()
|
||||||
.slice(0, -3)}`}
|
.slice(0, -3)}`}
|
||||||
primaryTypographyProps={{ noWrap: true }}
|
slotProps={{
|
||||||
secondaryTypographyProps={{ noWrap: true }}
|
primary: { noWrap: true },
|
||||||
|
secondary: { noWrap: true },
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { LichessGame } from "@/types/lichess";
|
|||||||
import {
|
import {
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
FormControl,
|
FormControl,
|
||||||
Grid,
|
Grid2 as Grid,
|
||||||
ListItemButton,
|
ListItemButton,
|
||||||
ListItemText,
|
ListItemText,
|
||||||
TextField,
|
TextField,
|
||||||
@@ -60,12 +60,11 @@ export default function LichessInput({ pgn, setPgn }: Props) {
|
|||||||
{lichessUsername && (
|
{lichessUsername && (
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
xs={12}
|
|
||||||
gap={2}
|
gap={2}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignContent="center"
|
alignContent="center"
|
||||||
minHeight={100}
|
minHeight={100}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
{games.map((game) => (
|
{games.map((game) => (
|
||||||
<ListItemButton
|
<ListItemButton
|
||||||
@@ -87,8 +86,10 @@ export default function LichessInput({ pgn, setPgn }: Props) {
|
|||||||
)
|
)
|
||||||
.toLocaleString()
|
.toLocaleString()
|
||||||
.slice(0, -3)}`}
|
.slice(0, -3)}`}
|
||||||
primaryTypographyProps={{ noWrap: true }}
|
slotProps={{
|
||||||
secondaryTypographyProps={{ noWrap: true }}
|
primary: { noWrap: true },
|
||||||
|
secondary: { noWrap: true },
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
OutlinedInput,
|
OutlinedInput,
|
||||||
DialogActions,
|
DialogActions,
|
||||||
Typography,
|
Typography,
|
||||||
Grid,
|
Grid2 as Grid,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { Chess } from "chess.js";
|
import { Chess } from "chess.js";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { Button, CircularProgress, Grid, Typography } from "@mui/material";
|
import {
|
||||||
|
Button,
|
||||||
|
CircularProgress,
|
||||||
|
Grid2 as Grid,
|
||||||
|
Typography,
|
||||||
|
} from "@mui/material";
|
||||||
import { useAtom, useAtomValue } from "jotai";
|
import { useAtom, useAtomValue } from "jotai";
|
||||||
import { gameAtom, isGameInProgressAtom } from "./states";
|
import { gameAtom, isGameInProgressAtom } from "./states";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
@@ -22,30 +27,28 @@ export default function GameInProgress() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
gap={2}
|
gap={2}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
item
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
|
||||||
gap={2}
|
gap={2}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Typography>Game in progress</Typography>
|
<Typography>Game in progress</Typography>
|
||||||
<CircularProgress size={20} color="info" />
|
<CircularProgress size={20} color="info" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid item container justifyContent="center" alignItems="center" xs={12}>
|
<Grid container justifyContent="center" alignItems="center" size={12}>
|
||||||
<UndoMoveButton />
|
<UndoMoveButton />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid item container justifyContent="center" alignItems="center" xs={12}>
|
<Grid container justifyContent="center" alignItems="center" size={12}>
|
||||||
<Button variant="outlined" onClick={handleResign}>
|
<Button variant="outlined" onClick={handleResign}>
|
||||||
Resign
|
Resign
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { gameAtom, isGameInProgressAtom, playerColorAtom } from "./states";
|
import { gameAtom, isGameInProgressAtom, playerColorAtom } from "./states";
|
||||||
import { Button, Grid, Typography } from "@mui/material";
|
import { Button, Grid2 as Grid, Typography } from "@mui/material";
|
||||||
import { Color } from "@/types/enums";
|
import { Color } from "@/types/enums";
|
||||||
import { setGameHeaders } from "@/lib/chess";
|
import { setGameHeaders } from "@/lib/chess";
|
||||||
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
||||||
@@ -40,14 +40,13 @@ export default function GameRecap() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
|
||||||
container
|
container
|
||||||
xs={12}
|
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
gap={2}
|
gap={2}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Grid item container xs={12} justifyContent="center">
|
<Grid container justifyContent="center" size={12}>
|
||||||
<Typography>{getResultLabel()}</Typography>
|
<Typography>{getResultLabel()}</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
OutlinedInput,
|
OutlinedInput,
|
||||||
DialogActions,
|
DialogActions,
|
||||||
Typography,
|
Typography,
|
||||||
Grid,
|
Grid2 as Grid,
|
||||||
FormGroup,
|
FormGroup,
|
||||||
FormControlLabel,
|
FormControlLabel,
|
||||||
Switch,
|
Switch,
|
||||||
@@ -87,14 +87,13 @@ export default function GameSettingsDialog({ open, onClose }: Props) {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Grid
|
<Grid
|
||||||
marginTop={4}
|
marginTop={4}
|
||||||
item
|
|
||||||
container
|
container
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
|
||||||
rowGap={3}
|
rowGap={3}
|
||||||
|
size={12}
|
||||||
>
|
>
|
||||||
<Grid item container xs={12} justifyContent="center">
|
<Grid container justifyContent="center" size={12}>
|
||||||
<FormControl variant="outlined">
|
<FormControl variant="outlined">
|
||||||
<InputLabel id="dialog-select-label">Bot's engine</InputLabel>
|
<InputLabel id="dialog-select-label">Bot's engine</InputLabel>
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
Reference in New Issue
Block a user