style : UI small improvements

This commit is contained in:
GuillaumeSD
2024-03-09 02:49:09 +01:00
parent 0ffba8c6c7
commit ef4c090834
3 changed files with 10 additions and 3 deletions

View File

@@ -129,7 +129,7 @@ export abstract class UciEngine {
const result = await this.evaluatePosition(fen, depth); const result = await this.evaluatePosition(fen, depth);
positions.push(result); positions.push(result);
setEvaluationProgress?.( setEvaluationProgress?.(
Math.max((fens.indexOf(fen) / fens.length) * 100 - 5, 2) Math.max(((fens.indexOf(fen) + 1) / fens.length) * 100 - 2, 2)
); );
} }

View File

@@ -43,7 +43,10 @@ export default function EvaluationBar({ height }: Props) {
borderRadius="5px" borderRadius="5px"
> >
<Box <Box
sx={{ backgroundColor: boardOrientation ? "#424242" : "white" }} sx={{
backgroundColor: boardOrientation ? "#424242" : "white",
transition: "height 1s",
}}
height={`${ height={`${
boardOrientation boardOrientation
? 100 - evalBar.whiteBarPercentage ? 100 - evalBar.whiteBarPercentage
@@ -67,7 +70,10 @@ export default function EvaluationBar({ height }: Props) {
</Box> </Box>
<Box <Box
sx={{ backgroundColor: boardOrientation ? "white" : "#424242" }} sx={{
backgroundColor: boardOrientation ? "white" : "#424242",
transition: "height 1s",
}}
height={`${ height={`${
boardOrientation boardOrientation
? evalBar.whiteBarPercentage ? evalBar.whiteBarPercentage

View File

@@ -44,6 +44,7 @@ const SquareRenderer = forwardRef<HTMLDivElement, CustomSquareProps>(
right: "max(-15px, -1.8vw)", right: "max(-15px, -1.8vw)",
maxWidth: "3.6vw", maxWidth: "3.6vw",
maxHeight: "3.6vw", maxHeight: "3.6vw",
zIndex: 100,
}} }}
/> />
)} )}