fix: only show configuration gear icon for players 1 and 2
Hide gear icons for players 3+ since only players 1 & 2 have customizable profiles in UserProfileContext: - ActivePlayersList: conditional render gear button, update cursor style - FullscreenPlayerSelection: conditional render gear button - Prevents confusing UI where clicking gear had no effect 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -27,18 +27,19 @@ export function ActivePlayersList({ activePlayers, shouldEmphasize, onRemovePlay
|
||||
lineHeight: 1,
|
||||
transition: 'font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease',
|
||||
filter: shouldEmphasize ? 'drop-shadow(0 4px 8px rgba(0,0,0,0.25))' : 'none',
|
||||
cursor: shouldEmphasize ? 'pointer' : 'default'
|
||||
cursor: shouldEmphasize && (player.id === 1 || player.id === 2) ? 'pointer' : 'default'
|
||||
}}
|
||||
title={player.name}
|
||||
onClick={() => shouldEmphasize && onConfigurePlayer(player.id)}
|
||||
onClick={() => shouldEmphasize && (player.id === 1 || player.id === 2) && onConfigurePlayer(player.id)}
|
||||
onMouseEnter={() => shouldEmphasize && setHoveredPlayerId(player.id)}
|
||||
onMouseLeave={() => shouldEmphasize && setHoveredPlayerId(null)}
|
||||
>
|
||||
{player.emoji}
|
||||
{shouldEmphasize && hoveredPlayerId === player.id && (
|
||||
<>
|
||||
{/* Configure button - bottom left */}
|
||||
<button
|
||||
{/* Configure button - bottom left (only for players 1 & 2) */}
|
||||
{(player.id === 1 || player.id === 2) && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onConfigurePlayer(player.id)
|
||||
@@ -75,6 +76,7 @@ export function ActivePlayersList({ activePlayers, shouldEmphasize, onRemovePlay
|
||||
>
|
||||
⚙
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Remove button - top right */}
|
||||
<button
|
||||
|
||||
@@ -120,8 +120,9 @@ export function FullscreenPlayerSelection({ inactivePlayers, onSelectPlayer, onC
|
||||
</div>
|
||||
</button>
|
||||
|
||||
{/* Subtle gear icon for configuration */}
|
||||
<button
|
||||
{/* Subtle gear icon for configuration (only for players 1 & 2) */}
|
||||
{(player.id === 1 || player.id === 2) && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onConfigurePlayer(player.id)
|
||||
@@ -164,6 +165,7 @@ export function FullscreenPlayerSelection({ inactivePlayers, onSelectPlayer, onC
|
||||
>
|
||||
⚙️
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user