feat : new move classification icons

This commit is contained in:
GuillaumeSD
2025-05-24 23:56:24 +02:00
parent 05b1736aa4
commit b1a3239676
14 changed files with 14 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -32,6 +32,8 @@ if (
"AbortError: The user aborted a request.",
"Failed to fetch",
"Fetch is aborted",
"The operation was aborted.",
"AbortError: AbortError",
],
});
}

View File

@@ -1,16 +1,16 @@
import { EngineName, MoveClassification } from "./types/enums";
export const CLASSIFICATION_COLORS: Record<MoveClassification, string> = {
[MoveClassification.Book]: "#d5a47d",
[MoveClassification.Forced]: "#d5a47d",
[MoveClassification.Brilliant]: "#26c2a3",
[MoveClassification.Great]: "#4099ed",
[MoveClassification.Best]: "#3aab18",
[MoveClassification.Excellent]: "#3aab18",
[MoveClassification.Good]: "#81b64c",
[MoveClassification.Inaccuracy]: "#f7c631",
[MoveClassification.Mistake]: "#ffa459",
[MoveClassification.Blunder]: "#fa412d",
[MoveClassification.Book]: "#dbac86",
[MoveClassification.Forced]: "#dbac86",
[MoveClassification.Brilliant]: "#19d4af",
[MoveClassification.Great]: "#3894eb",
[MoveClassification.Best]: "#22ac38",
[MoveClassification.Excellent]: "#22ac38",
[MoveClassification.Good]: "#74b038",
[MoveClassification.Inaccuracy]: "#f2be1f",
[MoveClassification.Mistake]: "#e69f00",
[MoveClassification.Blunder]: "#df5353",
};
export const DEFAULT_ENGINE: EngineName = EngineName.Stockfish17Lite;

View File

@@ -41,7 +41,7 @@ export default function GameDatabase() {
if (typeof id !== "number") {
throw new Error("Unable to copy game");
}
await navigator.clipboard.writeText(games[id - 1].pgn);
await navigator.clipboard?.writeText?.(games[id - 1].pgn);
},
[games]
);

View File

@@ -71,7 +71,7 @@ export default function PanelToolBar() {
<IconButton
disabled={game.history().length === 0}
onClick={() => {
navigator.clipboard.writeText(game.pgn());
navigator.clipboard?.writeText?.(game.pgn());
}}
sx={{ paddingX: 1.2, paddingY: 0.5 }}
>