From 2794e9de67781614edc17336b284266d3e4a740c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 28 Feb 2026 15:04:21 +0900 Subject: feat(admin): allow admin users to view and submit code before game starts Admin users can now access the gaming UI (problem description, code editor, submit button) even when a game has not started yet. Regular users still see the waiting screen as before. Co-Authored-By: Claude Opus 4.6 --- frontend/app/components/GolfPlayApp.tsx | 16 ++++++++++++++++ .../app/components/GolfPlayApps/GolfPlayAppGaming.tsx | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'frontend/app') diff --git a/frontend/app/components/GolfPlayApp.tsx b/frontend/app/components/GolfPlayApp.tsx index 6c77f8c..1c1e7ae 100644 --- a/frontend/app/components/GolfPlayApp.tsx +++ b/frontend/app/components/GolfPlayApp.tsx @@ -121,6 +121,22 @@ export default function GolfPlayApp({ game, player, initialGameState }: Props) { if (gameStateKind === "loading") { return ; } else if (gameStateKind === "waiting") { + if (player.is_admin) { + return ( + + ); + } return ( {gameDisplayName} {isFinished ? (
終了
+ ) : leftTimeSeconds === null ? ( +
未開始
) : ( )} -- cgit v1.3.1