diff --git a/services/app/src/components/chessBoard/Tile.jsx b/services/app/src/components/chessBoard/Tile.jsx index aab12a46..9f0e479e 100644 --- a/services/app/src/components/chessBoard/Tile.jsx +++ b/services/app/src/components/chessBoard/Tile.jsx @@ -16,7 +16,7 @@ const Tile = ({ /* eslint-disable-next-line */ const _onClick = useCallback(() => { - if (!attribute && (row !== 6 && column !== 0)) { + if (!attribute) { onClick(row, column); } }, [onClick, row, column]); diff --git a/services/app/src/components/gameFooter/ChessBoardPiece.jsx b/services/app/src/components/gameFooter/ChessBoardPiece.jsx index 4ee0cc3c..4b7b1910 100644 --- a/services/app/src/components/gameFooter/ChessBoardPiece.jsx +++ b/services/app/src/components/gameFooter/ChessBoardPiece.jsx @@ -2,12 +2,15 @@ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import './chess-board-pieces.css'; +import { Avatar, Tooltip } from 'antd'; import { useChessBoardContext } from '../../contexts/ChessBoardContext'; import PlanningChessTooltip from '../planningChessTooltip/PlanningChessTooltip'; import { PieceName } from '../../constants/board'; +import { GameState } from '../../constants/gameConstants'; +import UserAvatar from '../avatar/UserAvatar'; const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength, disabled }) => { - const { selectedItem } = useChessBoardContext(); + const { selectedItem, turns, gameState } = useChessBoardContext(); const skipTooltipTxt = "Mark my move as complete, without any story points"; @@ -18,31 +21,82 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength, } return ( - ); diff --git a/services/app/src/components/gameFooter/chess-board-pieces.css b/services/app/src/components/gameFooter/chess-board-pieces.css index 1e7e6bde..566e8a3d 100644 --- a/services/app/src/components/gameFooter/chess-board-pieces.css +++ b/services/app/src/components/gameFooter/chess-board-pieces.css @@ -4,11 +4,25 @@ display: flex; justify-content: space-evenly; user-select: none; + height: auto; + position: relative; +} + +.figure-info { + position: absolute; + top: calc(100%); +} + +.piece-and-score { + display: flex; + flex-direction: column; + align-content: center; + align-items: center; + height: 85px; } .piece-field { width: clamp(56px, 6vh, 70px); - aspect-ratio: 1 / 2; flex-direction: column; border: 2px solid transparent; cursor: pointer; @@ -50,4 +64,4 @@ .figure-strength-container p { color: var(--white); letter-spacing: -0.1px; -} +} \ No newline at end of file diff --git a/services/app/src/static/style/spacing.css b/services/app/src/static/style/spacing.css index 5c14972e..76051305 100644 --- a/services/app/src/static/style/spacing.css +++ b/services/app/src/static/style/spacing.css @@ -79,7 +79,7 @@ .margin-y-0 { margin-top: 0px; margin-bottom: 0px } .margin-y-xs { margin-top: 4px; margin-bottom: 4px } .margin-y-s { margin-top: 8px; margin-bottom: 8px } -.margin-y-sm { margin-top: 12px; margin-bottom: 12px } +.margin-y-sm { margin-top: 10px; margin-bottom: 9px } .margin-y-m { margin-top: 16px; margin-bottom: 16px } .margin-y-l { margin-top: 20px; margin-bottom: 20px }