mirror of
https://github.com/LHY0125/Gobang-Game.git
synced 2026-06-30 10:35:55 +08:00
feat: Online 模式前端 UI — 房间管理/连接状态/remote-move/禁悔棋
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ export default function GameControls({ onBackToMenu }: Props) {
|
||||
const { t } = useTranslation();
|
||||
const undo = useGameStore((s) => s.undo);
|
||||
const status = useGameStore((s) => s.status);
|
||||
const mode = useGameStore((s) => s.mode);
|
||||
const refreshBoard = useGameStore((s) => s.refreshBoard);
|
||||
|
||||
const handleUndo = () => {
|
||||
@@ -38,7 +39,7 @@ export default function GameControls({ onBackToMenu }: Props) {
|
||||
|
||||
return (
|
||||
<div className="game-controls">
|
||||
<button onClick={handleUndo} disabled={status === 'game_over'}>
|
||||
<button onClick={handleUndo} disabled={status === 'game_over' || mode === 'Online'}>
|
||||
{t('game.undo')}
|
||||
</button>
|
||||
<button onClick={handleResign} disabled={status === 'game_over'}>
|
||||
|
||||
Reference in New Issue
Block a user