From 19fad1b969ac9b6c50b024a2c710e8f4fe792eb0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 19 Aug 2024 05:21:58 +0900 Subject: feat(frontend): improve play/watch pages styling --- frontend/app/components/GolfPlayApp.client.tsx | 14 +++++++++-- .../GolfPlayApps/GolfPlayAppConnecting.tsx | 4 +--- .../GolfPlayApps/GolfPlayAppStarting.tsx | 15 +++++++----- .../components/GolfPlayApps/GolfPlayAppWaiting.tsx | 22 +++++++++++++---- frontend/app/components/GolfWatchApp.client.tsx | 15 ++++++++++-- .../GolfWatchApps/GolfWatchAppConnecting.tsx | 4 +--- .../GolfWatchApps/GolfWatchAppStarting.tsx | 11 ++++++--- .../GolfWatchApps/GolfWatchAppWaiting.tsx | 28 ++++++++++++++++++---- frontend/app/components/PlayerProfile.tsx | 27 +++++++++++++++++++++ 9 files changed, 113 insertions(+), 27 deletions(-) create mode 100644 frontend/app/components/PlayerProfile.tsx (limited to 'frontend') diff --git a/frontend/app/components/GolfPlayApp.client.tsx b/frontend/app/components/GolfPlayApp.client.tsx index 82c0928..42f0250 100644 --- a/frontend/app/components/GolfPlayApp.client.tsx +++ b/frontend/app/components/GolfPlayApp.client.tsx @@ -225,9 +225,19 @@ export default function GolfPlayApp({ if (gameState === "connecting") { return ; } else if (gameState === "waiting") { - return ; + return ( + + ); } else if (gameState === "starting") { - return ; + return ( + + ); } else if (gameState === "gaming") { return (
-

- Connecting... -

+
接続中...
); diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx index 18e9ffe..06e3825 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx @@ -1,16 +1,19 @@ type Props = { + gameDisplayName: string; leftTimeSeconds: number; }; export default function GolfPlayAppStarting({ - leftTimeSeconds: timeLeft, + gameDisplayName, + leftTimeSeconds, }: Props) { return ( -
-
-

- Starting... ({timeLeft} s) -

+
+
+
{gameDisplayName}
+
+
+ {leftTimeSeconds}
); diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx index a1da33e..bbef43e 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx @@ -1,9 +1,23 @@ -export default function GolfPlayAppWaiting() { +import { PlayerInfo } from "../../models/PlayerInfo"; +import PlayerProfile from "../PlayerProfile"; + +type Props = { + gameDisplayName: string; + playerInfo: Omit; +}; + +export default function GolfPlayAppWaiting({ + gameDisplayName, + playerInfo, +}: Props) { return ( <> -
-
-

Waiting...

+
+
+
{gameDisplayName}
+
+
+