From cca0f63e50684d6806697589b620ee4b4c1b21b5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 20 Mar 2025 22:18:14 +0900 Subject: feat(frontend): improve watch page layout --- .../components/GolfPlayApps/GolfPlayAppGaming.tsx | 26 +++++++--------------- 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'frontend/app/components/GolfPlayApps') diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx index 0931f73..c4bd772 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx @@ -5,26 +5,18 @@ import { gamingLeftTimeSecondsAtom, scoreAtom, statusAtom, + calcCodeSize, } from "../../states/play"; import type { PlayerProfile } from "../../types/PlayerProfile"; import BorderedContainer from "../BorderedContainer"; import LeftTime from "../Gaming/LeftTime"; -import Problem from "../Gaming/Problem"; +import ProblemColumn from "../Gaming/ProblemColumn"; import SubmitButton from "../SubmitButton"; import SubmitStatusLabel from "../SubmitStatusLabel"; import ThreeColumnLayout from "../ThreeColumnLayout"; +import TitledColumn from "../TitledColumn"; import UserIcon from "../UserIcon"; -function calcCodeSize(code: string): number { - const trimmed = code - .replace(/\s+/g, "") - .replace(/^<\?php/, "") - .replace(/^<\?/, "") - .replace(/\?>$/, ""); - const utf8Encoded = new TextEncoder().encode(trimmed); - return utf8Encoded.length; -} - type Props = { gameDisplayName: string; playerProfile: PlayerProfile; @@ -86,13 +78,12 @@ export default function GolfPlayAppGaming({ - -
-
ソースコード
+
@@ -109,9 +100,8 @@ export default function GolfPlayAppGaming({ className="grow resize-none h-full w-full p-2 bg-gray-50 rounded-lg border border-gray-300 focus:outline-hidden focus:ring-2 focus:ring-gray-400 transition duration-300" /> -
-
-
提出結果
+ +
@@ -139,7 +129,7 @@ export default function GolfPlayAppGaming({ NOTE: 過去の提出結果を閲覧する機能は現在実装中です。それまでは提出コードをお手元に保管しておいてください。

- + ); -- cgit v1.2.3-70-g09d2