style : analysis UI size rework
This commit is contained in:
@@ -57,8 +57,8 @@ export default function GameReport() {
|
|||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.5)",
|
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.5)",
|
||||||
}}
|
}}
|
||||||
padding={3}
|
padding={2.5}
|
||||||
rowGap={3}
|
rowGap={2}
|
||||||
style={{
|
style={{
|
||||||
maxWidth: "1200px",
|
maxWidth: "1200px",
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ export default function ClassificationRow({ classification }: Props) {
|
|||||||
width={"3rem"}
|
width={"3rem"}
|
||||||
style={{ cursor: whiteNb ? "pointer" : "default" }}
|
style={{ cursor: whiteNb ? "pointer" : "default" }}
|
||||||
onClick={() => handleClick(Color.White)}
|
onClick={() => handleClick(Color.White)}
|
||||||
|
fontSize="0.9rem"
|
||||||
>
|
>
|
||||||
{whiteNb}
|
{whiteNb}
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -102,15 +103,17 @@ export default function ClassificationRow({ classification }: Props) {
|
|||||||
<Image
|
<Image
|
||||||
src={`/icons/${classification}.png`}
|
src={`/icons/${classification}.png`}
|
||||||
alt="move-icon"
|
alt="move-icon"
|
||||||
width={20}
|
width={18}
|
||||||
height={20}
|
height={18}
|
||||||
style={{
|
style={{
|
||||||
maxWidth: "3.6vw",
|
maxWidth: "3.5vw",
|
||||||
maxHeight: "3.6vw",
|
maxHeight: "3.5vw",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Typography align="center">{capitalize(classification)}</Typography>
|
<Typography align="center" fontSize="0.9rem">
|
||||||
|
{capitalize(classification)}
|
||||||
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
@@ -121,6 +124,7 @@ export default function ClassificationRow({ classification }: Props) {
|
|||||||
width={"3rem"}
|
width={"3rem"}
|
||||||
style={{ cursor: blackNb ? "pointer" : "default" }}
|
style={{ cursor: blackNb ? "pointer" : "default" }}
|
||||||
onClick={() => handleClick(Color.Black)}
|
onClick={() => handleClick(Color.Black)}
|
||||||
|
fontSize="0.9rem"
|
||||||
>
|
>
|
||||||
{blackNb}
|
{blackNb}
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function MovesClassificationsRecap() {
|
|||||||
item
|
item
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
rowGap={2}
|
rowGap={1}
|
||||||
xs={6}
|
xs={6}
|
||||||
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
||||||
maxHeight="100%"
|
maxHeight="100%"
|
||||||
@@ -30,13 +30,13 @@ export default function MovesClassificationsRecap() {
|
|||||||
wrap="nowrap"
|
wrap="nowrap"
|
||||||
xs={12}
|
xs={12}
|
||||||
>
|
>
|
||||||
<Typography width="12rem" align="center" noWrap>
|
<Typography width="12rem" align="center" noWrap fontSize="0.9rem">
|
||||||
{whiteName}
|
{whiteName}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography width="7rem" />
|
<Typography width="7rem" />
|
||||||
|
|
||||||
<Typography width="12rem" align="center" noWrap>
|
<Typography width="12rem" align="center" noWrap fontSize="0.9rem">
|
||||||
{blackName}
|
{blackName}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default function MovesPanel() {
|
|||||||
item
|
item
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="start"
|
alignItems="start"
|
||||||
gap={1}
|
gap={0.8}
|
||||||
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
sx={{ scrollbarWidth: "thin", overflowY: "auto" }}
|
||||||
maxHeight="100%"
|
maxHeight="100%"
|
||||||
xs={6}
|
xs={6}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default function MoveItem({ san, moveClassification, moveIdx }: Props) {
|
|||||||
width="5rem"
|
width="5rem"
|
||||||
wrap="nowrap"
|
wrap="nowrap"
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
paddingY={0.5}
|
paddingY={0.6}
|
||||||
sx={{
|
sx={{
|
||||||
cursor: isCurrentMove ? undefined : "pointer",
|
cursor: isCurrentMove ? undefined : "pointer",
|
||||||
backgroundColor: isCurrentMove ? "#4f4f4f" : undefined,
|
backgroundColor: isCurrentMove ? "#4f4f4f" : undefined,
|
||||||
@@ -60,15 +60,21 @@ export default function MoveItem({ san, moveClassification, moveIdx }: Props) {
|
|||||||
<Image
|
<Image
|
||||||
src={`/icons/${moveClassification}.png`}
|
src={`/icons/${moveClassification}.png`}
|
||||||
alt="move-icon"
|
alt="move-icon"
|
||||||
width={15}
|
width={14}
|
||||||
height={15}
|
height={14}
|
||||||
style={{
|
style={{
|
||||||
maxWidth: "3.6vw",
|
maxWidth: "3.5vw",
|
||||||
maxHeight: "3.6vw",
|
maxHeight: "3.5vw",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Typography color={getMoveColor(moveClassification)}>{san}</Typography>
|
<Typography
|
||||||
|
color={getMoveColor(moveClassification)}
|
||||||
|
fontSize="0.9rem"
|
||||||
|
lineHeight="0.9rem"
|
||||||
|
>
|
||||||
|
{san}
|
||||||
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,11 +13,13 @@ export default function MovesLine({ moves, moveNb }: Props) {
|
|||||||
container
|
container
|
||||||
item
|
item
|
||||||
justifyContent="space-evenly"
|
justifyContent="space-evenly"
|
||||||
alignItems="start"
|
alignItems="center"
|
||||||
xs={12}
|
xs={12}
|
||||||
wrap="nowrap"
|
wrap="nowrap"
|
||||||
>
|
>
|
||||||
<Typography width="2rem">{moveNb}.</Typography>
|
<Typography width="2rem" fontSize="0.9rem">
|
||||||
|
{moveNb}.
|
||||||
|
</Typography>
|
||||||
|
|
||||||
<MoveItem {...moves[0]} moveIdx={(moveNb - 1) * 2 + 1} />
|
<MoveItem {...moves[0]} moveIdx={(moveNb - 1) * 2 + 1} />
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export default function ReviewPanelBody() {
|
|||||||
xs={12}
|
xs={12}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
rowGap={1.5}
|
rowGap={1.2}
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
item
|
item
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export default function LineEvaluation({ line }: Props) {
|
|||||||
overflow="visible"
|
overflow="visible"
|
||||||
width="3em"
|
width="3em"
|
||||||
textAlign="center"
|
textAlign="center"
|
||||||
|
fontSize="0.9rem"
|
||||||
>
|
>
|
||||||
{showSkeleton ? (
|
{showSkeleton ? (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
@@ -45,6 +46,7 @@ export default function LineEvaluation({ line }: Props) {
|
|||||||
<Typography
|
<Typography
|
||||||
noWrap
|
noWrap
|
||||||
maxWidth={{ xs: "15em", sm: "25em", md: "30em", lg: "25em" }}
|
maxWidth={{ xs: "15em", sm: "25em", md: "30em", lg: "25em" }}
|
||||||
|
fontSize="0.9rem"
|
||||||
>
|
>
|
||||||
{showSkeleton ? (
|
{showSkeleton ? (
|
||||||
<Skeleton variant="rounded" animation="wave" width="15em" />
|
<Skeleton variant="rounded" animation="wave" width="15em" />
|
||||||
|
|||||||
@@ -37,8 +37,16 @@ export default function MoveInfo() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item container columnGap={5} xs={12} justifyContent="center">
|
<Grid item container columnGap={5} xs={12} justifyContent="center">
|
||||||
{moveLabel && <Typography align="center">{moveLabel}</Typography>}
|
{moveLabel && (
|
||||||
{bestMoveLabel && <Typography align="center">{bestMoveLabel}</Typography>}
|
<Typography align="center" fontSize="0.9rem">
|
||||||
|
{moveLabel}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
{bestMoveLabel && (
|
||||||
|
<Typography align="center" fontSize="0.9rem">
|
||||||
|
{bestMoveLabel}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ export default function Opening() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography align="center">{opening}</Typography>
|
<Typography align="center" fontSize="0.9rem">
|
||||||
|
{opening}
|
||||||
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,19 +22,19 @@ export default function GamePanel() {
|
|||||||
columnGap={3}
|
columnGap={3}
|
||||||
>
|
>
|
||||||
<Grid item container xs justifyContent="center" alignItems="center">
|
<Grid item container xs justifyContent="center" alignItems="center">
|
||||||
<Typography noWrap>
|
<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 item container xs justifyContent="center" alignItems="center">
|
||||||
<Typography noWrap>
|
<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 item container xs justifyContent="center" alignItems="center">
|
||||||
<Typography noWrap>
|
<Typography noWrap fontSize="0.9rem">
|
||||||
Result :{" "}
|
Result :{" "}
|
||||||
{gameFromUrl?.termination || game.header().Termination || "?"}
|
{gameFromUrl?.termination || game.header().Termination || "?"}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function ReviewPanelHeader() {
|
|||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
xs={12}
|
xs={12}
|
||||||
rowGap={3}
|
rowGap={2}
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
item
|
item
|
||||||
@@ -40,7 +40,7 @@ export default function ReviewPanelHeader() {
|
|||||||
xs={12}
|
xs={12}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
rowGap={3}
|
rowGap={2}
|
||||||
columnGap={12}
|
columnGap={12}
|
||||||
>
|
>
|
||||||
<GamePanel />
|
<GamePanel />
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ export default function FlipBoardButton() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title="Flip board">
|
<Tooltip title="Flip board">
|
||||||
<IconButton onClick={() => setBoardOrientation((prev) => !prev)}>
|
<IconButton
|
||||||
|
onClick={() => setBoardOrientation((prev) => !prev)}
|
||||||
|
sx={{ paddingX: 1.2, paddingY: 0.5 }}
|
||||||
|
>
|
||||||
<Icon icon="eva:flip-fill" />
|
<Icon icon="eva:flip-fill" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export default function GoToLastPositionButton() {
|
|||||||
setBoardPgn(game.pgn());
|
setBoardPgn(game.pgn());
|
||||||
}}
|
}}
|
||||||
disabled={isButtonDisabled}
|
disabled={isButtonDisabled}
|
||||||
|
sx={{ paddingX: 1.2, paddingY: 0.5 }}
|
||||||
>
|
>
|
||||||
<Icon icon="ri:skip-forward-line" />
|
<Icon icon="ri:skip-forward-line" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export default function ReviewPanelToolBar() {
|
|||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => resetBoard({ fen: getStartingFen({ game: board }) })}
|
onClick={() => resetBoard({ fen: getStartingFen({ game: board }) })}
|
||||||
disabled={boardHistory.length === 0}
|
disabled={boardHistory.length === 0}
|
||||||
|
sx={{ paddingX: 1.2, paddingY: 0.5 }}
|
||||||
>
|
>
|
||||||
<Icon icon="ri:skip-back-line" />
|
<Icon icon="ri:skip-back-line" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@@ -54,6 +55,7 @@ export default function ReviewPanelToolBar() {
|
|||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => undoBoardMove()}
|
onClick={() => undoBoardMove()}
|
||||||
disabled={boardHistory.length === 0}
|
disabled={boardHistory.length === 0}
|
||||||
|
sx={{ paddingX: 1.2, paddingY: 0.5 }}
|
||||||
>
|
>
|
||||||
<Icon icon="ri:arrow-left-s-line" height={30} />
|
<Icon icon="ri:arrow-left-s-line" height={30} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export default function NextMoveButton() {
|
|||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => addNextGameMoveToBoard()}
|
onClick={() => addNextGameMoveToBoard()}
|
||||||
disabled={!isButtonEnabled}
|
disabled={!isButtonEnabled}
|
||||||
|
sx={{ paddingX: 1.2, paddingY: 0.5 }}
|
||||||
>
|
>
|
||||||
<Icon icon="ri:arrow-right-s-line" height={30} />
|
<Icon icon="ri:arrow-right-s-line" height={30} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export default function SaveButton() {
|
|||||||
{gameFromUrl ? (
|
{gameFromUrl ? (
|
||||||
<Tooltip title="Game saved in database">
|
<Tooltip title="Game saved in database">
|
||||||
<Grid>
|
<Grid>
|
||||||
<IconButton disabled={true}>
|
<IconButton disabled={true} sx={{ paddingX: 1.2, paddingY: 0.5 }}>
|
||||||
<Icon icon="ri:folder-check-line" />
|
<Icon icon="ri:folder-check-line" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -49,7 +49,11 @@ export default function SaveButton() {
|
|||||||
) : (
|
) : (
|
||||||
<Tooltip title="Save game">
|
<Tooltip title="Save game">
|
||||||
<Grid>
|
<Grid>
|
||||||
<IconButton onClick={handleSave} disabled={!enableSave}>
|
<IconButton
|
||||||
|
onClick={handleSave}
|
||||||
|
disabled={!enableSave}
|
||||||
|
sx={{ paddingX: 1.2, paddingY: 0.5 }}
|
||||||
|
>
|
||||||
<Icon icon="ri:save-3-line" />
|
<Icon icon="ri:save-3-line" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user