feat: Online 模式前端 UI — 房间管理/连接状态/remote-move/禁悔棋

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 15:16:40 +08:00
parent 9aa9de6b74
commit bda917ce37
7 changed files with 111 additions and 24 deletions
+2 -1
View File
@@ -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'}>