minor UI changes
This commit is contained in:
@@ -313,11 +313,9 @@ export default function ShipPlacementScreen({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="placement-screen-layout">
|
<div className="placement-screen-layout">
|
||||||
{opponentReady && (
|
|
||||||
<div className="placement-opponent-badge">
|
<div className="placement-opponent-badge">
|
||||||
Соперник готов к бою!
|
{opponentReady ? "Соперник готов к бою!" : "Соперник расставляет корабли..."}
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="placement-container">
|
<div className="placement-container">
|
||||||
{/* Левая половина: игровое поле 10x10 с линейками и кнопками под ним */}
|
{/* Левая половина: игровое поле 10x10 с линейками и кнопками под ним */}
|
||||||
@@ -421,25 +419,20 @@ export default function ShipPlacementScreen({
|
|||||||
{/* Парящий под курсором корабль при перетаскивании */}
|
{/* Парящий под курсором корабль при перетаскивании */}
|
||||||
{activeDrag && (
|
{activeDrag && (
|
||||||
<div
|
<div
|
||||||
className={`floating-drag-ship ${
|
className={`floating-drag-ship ${activeDrag.orientation ? 'vertical' : 'horizontal'
|
||||||
activeDrag.orientation ? 'vertical' : 'horizontal'
|
|
||||||
}`}
|
}`}
|
||||||
style={{
|
style={{
|
||||||
left: `${
|
left: `${activeDrag.currentPos.x -
|
||||||
activeDrag.currentPos.x -
|
|
||||||
(!activeDrag.orientation ? activeDrag.segIndex * 33 + 15 : 15)
|
(!activeDrag.orientation ? activeDrag.segIndex * 33 + 15 : 15)
|
||||||
}px`,
|
}px`,
|
||||||
top: `${
|
top: `${activeDrag.currentPos.y -
|
||||||
activeDrag.currentPos.y -
|
|
||||||
(activeDrag.orientation ? activeDrag.segIndex * 33 + 15 : 15)
|
(activeDrag.orientation ? activeDrag.segIndex * 33 + 15 : 15)
|
||||||
}px`,
|
}px`,
|
||||||
width: `${
|
width: `${!activeDrag.orientation
|
||||||
!activeDrag.orientation
|
|
||||||
? activeDrag.ship.size * 30 + (activeDrag.ship.size - 1) * 3
|
? activeDrag.ship.size * 30 + (activeDrag.ship.size - 1) * 3
|
||||||
: 30
|
: 30
|
||||||
}px`,
|
}px`,
|
||||||
height: `${
|
height: `${activeDrag.orientation
|
||||||
activeDrag.orientation
|
|
||||||
? activeDrag.ship.size * 30 + (activeDrag.ship.size - 1) * 3
|
? activeDrag.ship.size * 30 + (activeDrag.ship.size - 1) * 3
|
||||||
: 30
|
: 30
|
||||||
}px`,
|
}px`,
|
||||||
|
|||||||
Reference in New Issue
Block a user