From 941557cba8dcf2aae9b08e2f61420437f5603b0c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Mar 2025 21:22:14 +0900 Subject: change port --- frontend/app/components/GolfPlayApp.client.tsx | 2 +- frontend/app/components/GolfWatchApp.client.tsx | 2 +- frontend/app/components/UserIcon.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'frontend/app/components') diff --git a/frontend/app/components/GolfPlayApp.client.tsx b/frontend/app/components/GolfPlayApp.client.tsx index 4bd464b..48c2c89 100644 --- a/frontend/app/components/GolfPlayApp.client.tsx +++ b/frontend/app/components/GolfPlayApp.client.tsx @@ -42,7 +42,7 @@ export default function GolfPlayApp({ }: Props) { const socketUrl = process.env.NODE_ENV === "development" - ? `ws://localhost:8002/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}` + ? `ws://localhost:8003/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}` : `wss://t.nil.ninja/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}`; const gameStateKind = useAtomValue(gameStateKindAtom); diff --git a/frontend/app/components/GolfWatchApp.client.tsx b/frontend/app/components/GolfWatchApp.client.tsx index f02bfb9..72db9e5 100644 --- a/frontend/app/components/GolfWatchApp.client.tsx +++ b/frontend/app/components/GolfWatchApp.client.tsx @@ -33,7 +33,7 @@ export type Props = { export default function GolfWatchApp({ game, sockToken }: Props) { const socketUrl = process.env.NODE_ENV === "development" - ? `ws://localhost:8002/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}` + ? `ws://localhost:8003/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}` : `wss://t.nil.ninja/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}`; const gameStateKind = useAtomValue(gameStateKindAtom); diff --git a/frontend/app/components/UserIcon.tsx b/frontend/app/components/UserIcon.tsx index 656c170..a4ee5e6 100644 --- a/frontend/app/components/UserIcon.tsx +++ b/frontend/app/components/UserIcon.tsx @@ -9,7 +9,7 @@ export default function UserIcon({ iconPath, displayName, className }: Props) { {`${displayName} Date: Tue, 4 Mar 2025 21:26:39 +0900 Subject: change base path --- README.md | 2 +- backend/admin/handler.go | 2 +- backend/main.go | 14 +++++++------- docs/DEV.md | 2 +- frontend/app/.client/audio/SoundEffect.ts | 4 ++-- frontend/app/.server/api/client.ts | 4 ++-- frontend/app/components/GolfPlayApp.client.tsx | 4 ++-- frontend/app/components/GolfWatchApp.client.tsx | 4 ++-- frontend/app/components/UserIcon.tsx | 4 ++-- frontend/app/root.tsx | 2 +- frontend/app/routes/_index.tsx | 2 +- frontend/app/routes/dashboard.tsx | 4 ++-- frontend/vite.config.ts | 4 ++-- nginx.conf | 10 +++++----- 14 files changed, 31 insertions(+), 31 deletions(-) (limited to 'frontend/app/components') diff --git a/README.md b/README.md index 0f168a9..d0f4c3b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ 2024-08-22 から 2024-08-24 にかけて開催された [iOSDC Japan 2024](https://iosdc.jp/2024/) の中の企画、Swift コードバトルのシステムです。 -[サイトはこちら (現在は新規にプレイすることはできません)](https://t.nil.ninja/iosdc-japan/2024/code-battle/) +[サイトはこちら (現在は新規にプレイすることはできません)](https://t.nil.ninja/phperkaigi/2025/code-battle/) # サンドボックス化の仕組み diff --git a/backend/admin/handler.go b/backend/admin/handler.go index 235e0be..c3e40e9 100644 --- a/backend/admin/handler.go +++ b/backend/admin/handler.go @@ -18,7 +18,7 @@ import ( ) const ( - basePath = "/iosdc-japan/2024/code-battle" + basePath = "/phperkaigi/2025/code-battle" ) var jst = time.FixedZone("Asia/Tokyo", 9*60*60) diff --git a/backend/main.go b/backend/main.go index f0448f1..1218b19 100644 --- a/backend/main.go +++ b/backend/main.go @@ -38,7 +38,7 @@ func main() { log.Fatalf("Error loading env %v", err) } - openAPISpec, err := api.GetSwaggerWithPrefix("/iosdc-japan/2024/code-battle/api") + openAPISpec, err := api.GetSwaggerWithPrefix("/phperkaigi/2025/code-battle/api") if err != nil { log.Fatalf("Error loading OpenAPI spec\n: %s", err) } @@ -69,7 +69,7 @@ func main() { log.Fatalf("Error restoring game hubs from db %v", err) } defer gameHubs.Close() - sockGroup := e.Group("/iosdc-japan/2024/code-battle/sock") + sockGroup := e.Group("/phperkaigi/2025/code-battle/sock") sockHandler := gameHubs.SockHandler() sockGroup.GET("/golf/:gameID/play", func(c echo.Context) error { return sockHandler.HandleSockGolfPlay(c) @@ -78,19 +78,19 @@ func main() { return sockHandler.HandleSockGolfWatch(c) }) - apiGroup := e.Group("/iosdc-japan/2024/code-battle/api") + apiGroup := e.Group("/phperkaigi/2025/code-battle/api") apiGroup.Use(oapimiddleware.OapiRequestValidator(openAPISpec)) apiHandler := api.NewHandler(queries, gameHubs) api.RegisterHandlers(apiGroup, api.NewStrictHandler(apiHandler, nil)) adminHandler := admin.NewHandler(queries, gameHubs) - adminGroup := e.Group("/iosdc-japan/2024/code-battle/admin") + adminGroup := e.Group("/phperkaigi/2025/code-battle/admin") adminHandler.RegisterHandlers(adminGroup) if config.isLocal { // For local dev: This is never used in production because the reverse // proxy directly handles /files. - filesGroup := e.Group("/iosdc-japan/2024/code-battle/files") + filesGroup := e.Group("/phperkaigi/2025/code-battle/files") filesGroup.Use(middleware.StaticWithConfig(middleware.StaticConfig{ Root: "/", Filesystem: http.Dir("/data/files"), @@ -99,10 +99,10 @@ func main() { // For local dev: This is never used in production because the reverse // proxy sends these paths to the app server. - e.GET("/iosdc-japan/2024/code-battle/*", func(c echo.Context) error { + e.GET("/phperkaigi/2025/code-battle/*", func(c echo.Context) error { return c.Redirect(http.StatusPermanentRedirect, "http://localhost:5173"+c.Request().URL.Path) }) - e.POST("/iosdc-japan/2024/code-battle/*", func(c echo.Context) error { + e.POST("/phperkaigi/2025/code-battle/*", func(c echo.Context) error { return c.Redirect(http.StatusPermanentRedirect, "http://localhost:5173"+c.Request().URL.Path) }) } diff --git a/docs/DEV.md b/docs/DEV.md index e91c6dc..7f79840 100644 --- a/docs/DEV.md +++ b/docs/DEV.md @@ -20,7 +20,7 @@ 1. `cd path/to/the/repo` 1. `make init` 1. `make up` -1. Access to http://localhost:5173/iosdc-japan/2024/code-battle/. +1. Access to http://localhost:5173/phperkaigi/2025/code-battle/. * User `a`, `b` and `c` can log in with `pass` password. * User `a` and `b` are players. * User `c` is an administrator. diff --git a/frontend/app/.client/audio/SoundEffect.ts b/frontend/app/.client/audio/SoundEffect.ts index fb003fa..99eccdd 100644 --- a/frontend/app/.client/audio/SoundEffect.ts +++ b/frontend/app/.client/audio/SoundEffect.ts @@ -14,8 +14,8 @@ export type SoundEffect = const BASE_URL = process.env.NODE_ENV === "development" - ? `http://localhost:8003/iosdc-japan/2024/code-battle/files/audio` - : `/iosdc-japan/2024/code-battle/files/audio`; + ? `http://localhost:8003/phperkaigi/2025/code-battle/files/audio` + : `/phperkaigi/2025/code-battle/files/audio`; export function getFileUrl(soundEffect: SoundEffect): string { switch (soundEffect) { diff --git a/frontend/app/.server/api/client.ts b/frontend/app/.server/api/client.ts index d69b617..edcffc1 100644 --- a/frontend/app/.server/api/client.ts +++ b/frontend/app/.server/api/client.ts @@ -4,8 +4,8 @@ import type { paths } from "./schema"; const apiClient = createClient({ baseUrl: process.env.NODE_ENV === "development" - ? "http://localhost:8003/iosdc-japan/2024/code-battle/api/" - : "http://api-server/iosdc-japan/2024/code-battle/api/", + ? "http://localhost:8003/phperkaigi/2025/code-battle/api/" + : "http://api-server/phperkaigi/2025/code-battle/api/", }); export async function apiPostLogin( diff --git a/frontend/app/components/GolfPlayApp.client.tsx b/frontend/app/components/GolfPlayApp.client.tsx index 48c2c89..c81fe7e 100644 --- a/frontend/app/components/GolfPlayApp.client.tsx +++ b/frontend/app/components/GolfPlayApp.client.tsx @@ -42,8 +42,8 @@ export default function GolfPlayApp({ }: Props) { const socketUrl = process.env.NODE_ENV === "development" - ? `ws://localhost:8003/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}` - : `wss://t.nil.ninja/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}`; + ? `ws://localhost:8003/phperkaigi/2025/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}` + : `wss://t.nil.ninja/phperkaigi/2025/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}`; const gameStateKind = useAtomValue(gameStateKindAtom); const setCurrentTimestamp = useSetAtom(setCurrentTimestampAtom); diff --git a/frontend/app/components/GolfWatchApp.client.tsx b/frontend/app/components/GolfWatchApp.client.tsx index 72db9e5..e80a009 100644 --- a/frontend/app/components/GolfWatchApp.client.tsx +++ b/frontend/app/components/GolfWatchApp.client.tsx @@ -33,8 +33,8 @@ export type Props = { export default function GolfWatchApp({ game, sockToken }: Props) { const socketUrl = process.env.NODE_ENV === "development" - ? `ws://localhost:8003/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}` - : `wss://t.nil.ninja/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}`; + ? `ws://localhost:8003/phperkaigi/2025/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}` + : `wss://t.nil.ninja/phperkaigi/2025/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}`; const gameStateKind = useAtomValue(gameStateKindAtom); const setCurrentTimestamp = useSetAtom(setCurrentTimestampAtom); diff --git a/frontend/app/components/UserIcon.tsx b/frontend/app/components/UserIcon.tsx index a4ee5e6..e14a571 100644 --- a/frontend/app/components/UserIcon.tsx +++ b/frontend/app/components/UserIcon.tsx @@ -9,8 +9,8 @@ export default function UserIcon({ iconPath, displayName, className }: Props) { {`${displayName} [ - { rel: "icon", href: "/iosdc-japan/2024/code-battle/favicon.svg" }, + { rel: "icon", href: "/phperkaigi/2025/code-battle/favicon.svg" }, ]; export function Layout({ children }: { children: React.ReactNode }) { diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index.tsx index 808302d..ec4dfcb 100644 --- a/frontend/app/routes/_index.tsx +++ b/frontend/app/routes/_index.tsx @@ -16,7 +16,7 @@ export default function Index() { return (
iOSDC Japan 2024 diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index 53b32e0..a68d5c5 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -86,8 +86,8 @@ export default function Dashboard() { diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 983190a..004af2c 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ - base: "/iosdc-japan/2024/code-battle/", + base: "/phperkaigi/2025/code-battle/", plugins: [ remix({ future: { @@ -11,7 +11,7 @@ export default defineConfig({ v3_relativeSplatPath: true, v3_throwAbortReason: true, }, - basename: "/iosdc-japan/2024/code-battle/", + basename: "/phperkaigi/2025/code-battle/", }), tsconfigPaths(), ], diff --git a/nginx.conf b/nginx.conf index f421647..4796bbf 100644 --- a/nginx.conf +++ b/nginx.conf @@ -12,11 +12,11 @@ http { server { listen 80; - location /iosdc-japan/2024/code-battle/files/ { + location /phperkaigi/2025/code-battle/files/ { alias /var/www/files/; } - location /iosdc-japan/2024/code-battle/api/ { + location /phperkaigi/2025/code-battle/api/ { proxy_pass http://api-server; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -24,7 +24,7 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } - location /iosdc-japan/2024/code-battle/admin/ { + location /phperkaigi/2025/code-battle/admin/ { proxy_pass http://api-server; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -32,7 +32,7 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } - location /iosdc-japan/2024/code-battle/sock/ { + location /phperkaigi/2025/code-battle/sock/ { proxy_pass http://api-server; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -43,7 +43,7 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } - location /iosdc-japan/2024/code-battle/ { + location /phperkaigi/2025/code-battle/ { proxy_pass http://app-server; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; -- cgit v1.2.3-70-g09d2 From 5062cb9460915624e3f7b808c8f814ba9c31db75 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Mar 2025 21:37:22 +0900 Subject: rm audio feature --- backend/admin/handler.go | 22 ----- backend/admin/templates/audio.html | 14 --- backend/admin/templates/dashboard.html | 3 - frontend/app/.client/audio/AudioController.ts | 105 --------------------- frontend/app/.client/audio/SoundEffect.ts | 47 --------- .../GolfWatchAppWithAudioPlayRequest.client.tsx | 34 ------- frontend/app/routes/golf.$gameId.watch.tsx | 4 +- frontend/app/states/watch.ts | 3 - 8 files changed, 2 insertions(+), 230 deletions(-) delete mode 100644 backend/admin/templates/audio.html delete mode 100644 frontend/app/.client/audio/AudioController.ts delete mode 100644 frontend/app/.client/audio/SoundEffect.ts delete mode 100644 frontend/app/components/GolfWatchAppWithAudioPlayRequest.client.tsx (limited to 'frontend/app/components') diff --git a/backend/admin/handler.go b/backend/admin/handler.go index c3e40e9..ca70639 100644 --- a/backend/admin/handler.go +++ b/backend/admin/handler.go @@ -69,7 +69,6 @@ func (h *Handler) RegisterHandlers(g *echo.Group) { g.GET("/games", h.getGames) g.GET("/games/:gameID", h.getGameEdit) g.POST("/games/:gameID", h.postGameEdit) - g.GET("/audio", h.getAudioTest) } func (h *Handler) getDashboard(c echo.Context) error { @@ -290,24 +289,3 @@ func (h *Handler) postGameEdit(c echo.Context) error { return c.Redirect(http.StatusSeeOther, basePath+"/admin/games") } - -func (h *Handler) getAudioTest(c echo.Context) error { - return c.Render(http.StatusOK, "audio", echo.Map{ - "BasePath": basePath, - "Title": "Audio Test", - "Audio": []echo.Map{ - {"FileName": "EX_33.wav", "Label": "終了"}, - {"FileName": "EX_34.wav", "Label": "勝敗1"}, - {"FileName": "EX_35.wav", "Label": "勝敗2"}, - {"FileName": "EX_36.wav", "Label": "グッド1"}, - {"FileName": "EX_37.wav", "Label": "グッド2"}, - {"FileName": "EX_38.wav", "Label": "グッド3"}, - {"FileName": "EX_39.wav", "Label": "グッド4"}, - {"FileName": "EX_40.wav", "Label": "スコア更新1"}, - {"FileName": "EX_41.wav", "Label": "スコア更新2"}, - {"FileName": "EX_42.wav", "Label": "スコア更新3"}, - {"FileName": "EX_43.wav", "Label": "コンパイルエラー1"}, - {"FileName": "EX_44.wav", "Label": "コンパイルエラー2"}, - }, - }) -} diff --git a/backend/admin/templates/audio.html b/backend/admin/templates/audio.html deleted file mode 100644 index 21ec463..0000000 --- a/backend/admin/templates/audio.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ template "base.html" . }} - -{{ define "breadcrumb" }} -Dashboard -{{ end }} - -{{ define "content" }} - {{ range .Audio }} -
-
{{ .Label }}
- -
- {{ end }} -{{ end }} diff --git a/backend/admin/templates/dashboard.html b/backend/admin/templates/dashboard.html index 0f1fbaf..15b10ff 100644 --- a/backend/admin/templates/dashboard.html +++ b/backend/admin/templates/dashboard.html @@ -7,9 +7,6 @@

Games

-

- Audio Test -

diff --git a/frontend/app/.client/audio/AudioController.ts b/frontend/app/.client/audio/AudioController.ts deleted file mode 100644 index 296f685..0000000 --- a/frontend/app/.client/audio/AudioController.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { SoundEffect, getFileUrl } from "./SoundEffect"; - -export class AudioController { - audioElements: Record; - - constructor() { - this.audioElements = { - finish: null, - winner_1: null, - winner_2: null, - good_1: null, - good_2: null, - good_3: null, - good_4: null, - new_score_1: null, - new_score_2: null, - new_score_3: null, - compile_error_1: null, - compile_error_2: null, - }; - } - - loadAll(): Promise { - return new Promise((resolve) => { - const files = Object.keys(this.audioElements).map( - (se) => [se as SoundEffect, getFileUrl(se as SoundEffect)] as const, - ); - const totalCount = files.length; - let loadedCount = 0; - - files.forEach(([se, fileUrl]) => { - const audio = new Audio(fileUrl); - - audio.addEventListener( - "canplaythrough", - () => { - loadedCount++; - this.audioElements[se] = audio; - if (loadedCount === totalCount) { - resolve(); - } - }, - { once: true }, - ); - - audio.addEventListener("error", () => { - console.log(`Failed to load audio file: ${fileUrl}`); - // Ignore the error and continue loading other files. - }); - }); - }); - } - - async playDummySoundEffect(): Promise { - const audio = this.audioElements["good_1"]; - if (!audio) { - return; - } - audio.muted = true; - audio.currentTime = 0; - await audio.play(); - audio.muted = false; - } - - async playSoundEffect(soundEffect: SoundEffect): Promise { - const audio = this.audioElements[soundEffect]; - if (!audio) { - return; - } - audio.currentTime = 0; - await audio.play(); - } - - async playSoundEffectFinish(): Promise { - await this.playSoundEffect("finish"); - } - - async playSoundEffectWinner(winner: 1 | 2): Promise { - await this.playSoundEffect(`winner_${winner}`); - } - - async playSoundEffectGood(): Promise { - const variant = Math.floor(Math.random() * 4) + 1; - if (variant !== 1 && variant !== 2 && variant !== 3 && variant !== 4) { - return; // unreachable - } - return await this.playSoundEffect(`good_${variant}`); - } - - async playSoundEffectNewScore(): Promise { - const variant = Math.floor(Math.random() * 3) + 1; - if (variant !== 1 && variant !== 2 && variant !== 3) { - return; // unreachable - } - return await this.playSoundEffect(`new_score_${variant}`); - } - - async playSoundEffectCompileError(): Promise { - const variant = Math.floor(Math.random() * 2) + 1; - if (variant !== 1 && variant !== 2) { - return; // unreachable - } - return await this.playSoundEffect(`compile_error_${variant}`); - } -} diff --git a/frontend/app/.client/audio/SoundEffect.ts b/frontend/app/.client/audio/SoundEffect.ts deleted file mode 100644 index 99eccdd..0000000 --- a/frontend/app/.client/audio/SoundEffect.ts +++ /dev/null @@ -1,47 +0,0 @@ -export type SoundEffect = - | "finish" - | "winner_1" - | "winner_2" - | "good_1" - | "good_2" - | "good_3" - | "good_4" - | "new_score_1" - | "new_score_2" - | "new_score_3" - | "compile_error_1" - | "compile_error_2"; - -const BASE_URL = - process.env.NODE_ENV === "development" - ? `http://localhost:8003/phperkaigi/2025/code-battle/files/audio` - : `/phperkaigi/2025/code-battle/files/audio`; - -export function getFileUrl(soundEffect: SoundEffect): string { - switch (soundEffect) { - case "finish": - return `${BASE_URL}/EX_33.wav`; - case "winner_1": - return `${BASE_URL}/EX_34.wav`; - case "winner_2": - return `${BASE_URL}/EX_35.wav`; - case "good_1": - return `${BASE_URL}/EX_36.wav`; - case "good_2": - return `${BASE_URL}/EX_37.wav`; - case "good_3": - return `${BASE_URL}/EX_38.wav`; - case "good_4": - return `${BASE_URL}/EX_39.wav`; - case "new_score_1": - return `${BASE_URL}/EX_40.wav`; - case "new_score_2": - return `${BASE_URL}/EX_41.wav`; - case "new_score_3": - return `${BASE_URL}/EX_42.wav`; - case "compile_error_1": - return `${BASE_URL}/EX_43.wav`; - case "compile_error_2": - return `${BASE_URL}/EX_44.wav`; - } -} diff --git a/frontend/app/components/GolfWatchAppWithAudioPlayRequest.client.tsx b/frontend/app/components/GolfWatchAppWithAudioPlayRequest.client.tsx deleted file mode 100644 index ce5a59c..0000000 --- a/frontend/app/components/GolfWatchAppWithAudioPlayRequest.client.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { useAtom } from "jotai"; -import { AudioController } from "../.client/audio/AudioController"; -import { audioControllerAtom } from "../states/watch"; -import GolfWatchApp, { type Props } from "./GolfWatchApp.client"; -import SubmitButton from "./SubmitButton"; - -export default function GolfWatchAppWithAudioPlayRequest({ - game, - sockToken, -}: Omit) { - const [audioController, setAudioController] = useAtom(audioControllerAtom); - const audioPlayPermitted = audioController !== null; - - if (audioPlayPermitted) { - return ; - } else { - return ( -
-
- { - const audioController = new AudioController(); - await audioController.loadAll(); - await audioController.playDummySoundEffect(); - setAudioController(audioController); - }} - > - 開始 - -
-
- ); - } -} diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx index f04f6b0..cdfc908 100644 --- a/frontend/app/routes/golf.$gameId.watch.tsx +++ b/frontend/app/routes/golf.$gameId.watch.tsx @@ -3,7 +3,7 @@ import { ClientLoaderFunctionArgs, useLoaderData } from "@remix-run/react"; import { useHydrateAtoms } from "jotai/utils"; import { apiGetGame, apiGetToken } from "../.server/api/client"; import { ensureUserLoggedIn } from "../.server/auth"; -import GolfWatchAppWithAudioPlayRequest from "../components/GolfWatchAppWithAudioPlayRequest.client"; +import GolfWatchApp from "../components/GolfWatchApp.client"; import GolfWatchAppConnecting from "../components/GolfWatchApps/GolfWatchAppConnecting"; import { codeAAtom, @@ -183,5 +183,5 @@ export default function GolfWatch() { [submitResultBAtom, playerStateB.submitResult], ]); - return ; + return ; } diff --git a/frontend/app/states/watch.ts b/frontend/app/states/watch.ts index 5f5c4db..cb719eb 100644 --- a/frontend/app/states/watch.ts +++ b/frontend/app/states/watch.ts @@ -1,5 +1,4 @@ import { atom } from "jotai"; -import { AudioController } from "../.client/audio/AudioController"; import type { components } from "../.server/api/schema"; import type { SubmitResult } from "../types/SubmitResult"; @@ -251,5 +250,3 @@ export const handleWsSubmitResultMessageAtom = atom( callback(player_id, newResult, score); }, ); - -export const audioControllerAtom = atom(null); -- cgit v1.2.3-70-g09d2 From 36a45e4e65945bccd5082f4e26c057c760ea5a7c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Mar 2025 22:01:37 +0900 Subject: update index page --- frontend/app/components/BorderedContainer.tsx | 2 +- frontend/app/components/NavigateLink.tsx | 2 +- frontend/app/routes/_index.tsx | 21 ++++++++++----------- frontend/public/favicon.svg | 2 +- frontend/public/logo.svg | 1 + 5 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 frontend/public/logo.svg (limited to 'frontend/app/components') diff --git a/frontend/app/components/BorderedContainer.tsx b/frontend/app/components/BorderedContainer.tsx index cbbfbde..fe15c3b 100644 --- a/frontend/app/components/BorderedContainer.tsx +++ b/frontend/app/components/BorderedContainer.tsx @@ -6,7 +6,7 @@ type Props = { export default function BorderedContainer({ children }: Props) { return ( -
+
{children}
); diff --git a/frontend/app/components/NavigateLink.tsx b/frontend/app/components/NavigateLink.tsx index b749cea..02aae3e 100644 --- a/frontend/app/components/NavigateLink.tsx +++ b/frontend/app/components/NavigateLink.tsx @@ -4,7 +4,7 @@ export default function NavigateLink(props: LinkProps) { return ( ); } diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index.tsx index 4aa068a..ff2209b 100644 --- a/frontend/app/routes/_index.tsx +++ b/frontend/app/routes/_index.tsx @@ -14,27 +14,26 @@ export async function loader({ request }: LoaderFunctionArgs) { export default function Index() { return ( -
+
iOSDC Japan 2024
-
-
iOSDC Japan 2024
-
Swift Code Battle
+
+
PHPER CODE BATTLE

- Swift コードバトルは指示された動作をする Swift + PHPer コードバトルは指示された動作をする PHP コードをより短く書けた方が勝ち、という 1 対 1 - の対戦コンテンツです。8/22(木)day0 前夜祭では 8/12 + の対戦コンテンツです。3/21(金)day0 前夜祭では 3/8 に実施された予選を勝ち抜いたプレイヤーによるトーナメント形式での - Swift - コードバトルを実施します。ここでは短いコードが正義です!可読性も保守性も放り投げた、イベントならではのコードをお楽しみください! + PHPer コードバトルを実施します。 + ここでは短いコードが正義です!可読性も保守性も放り投げた、イベントならではのコードをお楽しみください!

diff --git a/frontend/public/favicon.svg b/frontend/public/favicon.svg index f2eea0d..682d390 100644 --- a/frontend/public/favicon.svg +++ b/frontend/public/favicon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/public/logo.svg b/frontend/public/logo.svg new file mode 100644 index 0000000..b123f96 --- /dev/null +++ b/frontend/public/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 9c61843bdbd67d3c026bd8fc1a82f5cb9a984131 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Mar 2025 22:05:46 +0900 Subject: update site name --- .github/workflows/update-submodule.yml | 52 +++++++++++----------- README.md | 2 +- backend/admin/templates/base.html | 2 +- .../components/GolfPlayApps/GolfPlayAppGaming.tsx | 2 +- .../GolfPlayApps/GolfPlayAppStarting.tsx | 2 +- .../components/GolfPlayApps/GolfPlayAppWaiting.tsx | 2 +- .../GolfWatchApps/GolfWatchAppGaming.tsx | 2 +- .../GolfWatchApps/GolfWatchAppStarting.tsx | 2 +- .../GolfWatchApps/GolfWatchAppWaiting.tsx | 2 +- frontend/app/routes/_index.tsx | 2 +- frontend/app/routes/dashboard.tsx | 2 +- frontend/app/routes/golf.$gameId.play.tsx | 4 +- frontend/app/routes/golf.$gameId.watch.tsx | 4 +- frontend/app/routes/login.tsx | 2 +- frontend/app/tailwind.css | 6 --- 15 files changed, 41 insertions(+), 47 deletions(-) (limited to 'frontend/app/components') diff --git a/.github/workflows/update-submodule.yml b/.github/workflows/update-submodule.yml index ac6142d..833c781 100644 --- a/.github/workflows/update-submodule.yml +++ b/.github/workflows/update-submodule.yml @@ -1,26 +1,26 @@ -name: Update submodule -on: - push: - branches: [main] -jobs: - update-submodule: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - repository: nsfisis/nil.ninja - submodules: true - token: ${{ secrets.GH_PAT }} - path: nil.ninja - - - run: | - cd nil.ninja - cd vhosts/t/albatross-swift - git fetch --prune origin - git switch -d origin/main - cd "$(git rev-parse --show-superproject-working-tree)" - git add vhosts/t/albatross-swift - git config user.name nsfisis - git config user.email nsfisis@gmail.com - git commit -m "[automated] Update 'vhosts/t/albatross-swift' (${GITHUB_SHA})" - git push origin main +# name: Update submodule +# on: +# push: +# branches: [main] +# jobs: +# update-submodule: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# with: +# repository: nsfisis/nil.ninja +# submodules: true +# token: ${{ secrets.GH_PAT }} +# path: nil.ninja +# +# - run: | +# cd nil.ninja +# cd vhosts/t/albatross-swift +# git fetch --prune origin +# git switch -d origin/main +# cd "$(git rev-parse --show-superproject-working-tree)" +# git add vhosts/t/albatross-swift +# git config user.name nsfisis +# git config user.email nsfisis@gmail.com +# git commit -m "[automated] Update 'vhosts/t/albatross-swift' (${GITHUB_SHA})" +# git push origin main diff --git a/README.md b/README.md index d44c602..ee8ec63 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Albatross.swift +# PHPerKaigi 2025 Albatross # これは何? diff --git a/backend/admin/templates/base.html b/backend/admin/templates/base.html index 8e71194..08c7dc5 100644 --- a/backend/admin/templates/base.html +++ b/backend/admin/templates/base.html @@ -1,7 +1,7 @@ - ADMIN {{ .Title }} | iOSDC Japan 2024 Albatross.swift + ADMIN {{ .Title }} | PHPerKaigi 2025 Albatross diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx index 0aa6b3d..d4a059f 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx @@ -55,7 +55,7 @@ export default function GolfPlayAppGaming({ return (
-
+
{gameDisplayName}
{leftTime}
diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx index b41dfed..07b93d6 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx @@ -10,7 +10,7 @@ export default function GolfPlayAppStarting({ gameDisplayName }: Props) { return (
-
+
{gameDisplayName}
diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx index 706dc8f..4b74c0d 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx @@ -12,7 +12,7 @@ export default function GolfPlayAppWaiting({ }: Props) { return (
-
+
{gameDisplayName}
diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx index 2907f5a..7cfbc86 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx @@ -52,7 +52,7 @@ export default function GolfWatchAppGaming({ : gameResult === "winB" ? "bg-purple-400" : "bg-pink-500" - : "bg-iosdc-japan"; + : "bg-sky-600"; return (
diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx index 684d2af..82e5334 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx @@ -10,7 +10,7 @@ export default function GolfWatchAppStarting({ gameDisplayName }: Props) { return (
-
+
{gameDisplayName}
diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx index 0e964e3..c2a5431 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx @@ -14,7 +14,7 @@ export default function GolfWatchAppWaiting({ }: Props) { return (
-
+
{gameDisplayName}
diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index.tsx index ff2209b..5dda2c8 100644 --- a/frontend/app/routes/_index.tsx +++ b/frontend/app/routes/_index.tsx @@ -4,7 +4,7 @@ import BorderedContainer from "../components/BorderedContainer"; import NavigateLink from "../components/NavigateLink"; export const meta: MetaFunction = () => [ - { title: "iOSDC Japan 2024 Albatross.swift" }, + { title: "PHPerKaigi 2025 Albatross" }, ]; export async function loader({ request }: LoaderFunctionArgs) { diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index a68d5c5..20038c1 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -7,7 +7,7 @@ import NavigateLink from "../components/NavigateLink"; import UserIcon from "../components/UserIcon"; export const meta: MetaFunction = () => [ - { title: "Dashboard | iOSDC Japan 2024 Albatross.swift" }, + { title: "Dashboard | PHPerKaigi 2025 Albatross" }, ]; export async function loader({ request }: LoaderFunctionArgs) { diff --git a/frontend/app/routes/golf.$gameId.play.tsx b/frontend/app/routes/golf.$gameId.play.tsx index a2860dd..91a2b8c 100644 --- a/frontend/app/routes/golf.$gameId.play.tsx +++ b/frontend/app/routes/golf.$gameId.play.tsx @@ -16,8 +16,8 @@ import { PlayerState } from "../types/PlayerState"; export const meta: MetaFunction = ({ data }) => [ { title: data - ? `Golf Playing ${data.game.display_name} | iOSDC Japan 2024 Albatross.swift` - : "Golf Playing | iOSDC Japan 2024 Albatross.swift", + ? `Golf Playing ${data.game.display_name} | PHPerKaigi 2025 Albatross` + : "Golf Playing | PHPerKaigi 2025 Albatross", }, ]; diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx index cdfc908..5a41de5 100644 --- a/frontend/app/routes/golf.$gameId.watch.tsx +++ b/frontend/app/routes/golf.$gameId.watch.tsx @@ -20,8 +20,8 @@ import { PlayerState } from "../types/PlayerState"; export const meta: MetaFunction = ({ data }) => [ { title: data - ? `Golf Watching ${data.game.display_name} | iOSDC Japan 2024 Albatross.swift` - : "Golf Watching | iOSDC Japan 2024 Albatross.swift", + ? `Golf Watching ${data.game.display_name} | PHPerKaigi 2025 Albatross` + : "Golf Watching | PHPerKaigi 2025 Albatross", }, ]; diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx index b1249e0..b59ce43 100644 --- a/frontend/app/routes/login.tsx +++ b/frontend/app/routes/login.tsx @@ -10,7 +10,7 @@ import InputText from "../components/InputText"; import SubmitButton from "../components/SubmitButton"; export const meta: MetaFunction = () => [ - { title: "Login | iOSDC Japan 2024 Albatross.swift" }, + { title: "Login | PHPerKaigi 2025 Albatross" }, ]; export async function loader({ request }: LoaderFunctionArgs) { diff --git a/frontend/app/tailwind.css b/frontend/app/tailwind.css index 6d3faee..b5c61c9 100644 --- a/frontend/app/tailwind.css +++ b/frontend/app/tailwind.css @@ -1,9 +1,3 @@ @tailwind base; @tailwind components; @tailwind utilities; - -@layer components { - .bg-iosdc-japan { - @apply bg-gradient-to-r from-orange-400 via-pink-500 to-purple-400; - } -} -- cgit v1.2.3-70-g09d2 From bd9c2e8b587c733059d44f642c53536eb7fe1ec9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Mar 2025 22:13:44 +0900 Subject: update colors --- frontend/app/components/InputText.tsx | 2 +- frontend/app/components/SubmitButton.tsx | 2 +- frontend/app/routes/_index.tsx | 2 +- frontend/app/routes/dashboard.tsx | 2 +- frontend/app/routes/login.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'frontend/app/components') diff --git a/frontend/app/components/InputText.tsx b/frontend/app/components/InputText.tsx index 3f2c526..ed68206 100644 --- a/frontend/app/components/InputText.tsx +++ b/frontend/app/components/InputText.tsx @@ -6,7 +6,7 @@ export default function InputText(props: InputProps) { return ( ); } diff --git a/frontend/app/components/SubmitButton.tsx b/frontend/app/components/SubmitButton.tsx index 1400a7b..643b3f5 100644 --- a/frontend/app/components/SubmitButton.tsx +++ b/frontend/app/components/SubmitButton.tsx @@ -6,7 +6,7 @@ export default function SubmitButton(props: ButtonProps) { return (