From 7e277bad5bd730947bb4b47cdb4ae362451cfb8a Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 20 May 2025 02:46:48 -0700 Subject: frontend: convert titlebar menus to full page game selector - due to growing number of games supported --- site/src/pages/GameSelector.tsx | 99 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 site/src/pages/GameSelector.tsx (limited to 'site/src/pages') diff --git a/site/src/pages/GameSelector.tsx b/site/src/pages/GameSelector.tsx new file mode 100644 index 0000000..d9d5279 --- /dev/null +++ b/site/src/pages/GameSelector.tsx @@ -0,0 +1,99 @@ +import { Link, useSearchParams } from "react-router-dom"; +import TitleBar from "../components/TitleBar"; + +interface GameCategory { + name: string; + description: string; + games: { id: string; title: string }[]; +} + +const gameInfo: GameCategory[] = [ + { + name: "KONAMI", + description: "", + games: [ + { id: "iidx", title: "beatmania IIDX" }, + { id: "sdvx", title: "SOUND VOLTEX" }, + { id: "ddr", title: "DanceDanceRevolution" }, + { id: "jubeat", title: "jubeat" }, + { id: "popn_music", title: "pop'n music" }, + { id: "nostalgia", title: "NOSTALGIA" }, + { id: "gitadora", title: "GITADORA" }, + { id: "dance_rush", title: "DANCERUSH" }, + { id: "dance_around", title: "DANCE aROUND" }, + { id: "polaris_chord", title: "POLARIS CHORD" }, + ], + }, + { + name: "SEGA", + description: "", + games: [ + { id: "chunithm_jp", title: "CHUNITHM (JAPAN)" }, + { id: "chunithm_intl", title: "CHUNITHM (INTERNATIONAL)" }, + { id: "maimaidx_jp", title: "maimai DX (JAPAN)" }, + { id: "maimaidx_intl", title: "maimai DX (INTERNATIONAL)" }, + { id: "ongeki_jp", title: "O.N.G.E.K.I" }, + ], + }, + { + name: "TAITO", + description: "", + games: [{ id: "music_diver", title: "MUSIC DIVER" }], + }, + { + name: "BANDAI NAMCO", + description: "", + games: [{ id: "taiko", title: "Taiko no Tatsujin" }, { id: "wmmt", title: "WANGAN MIDNIGHT MAXIMUM TUNE" }], + }, + { + name: "COMMUNITY", + description: "Community-driven projects to continue the legacy of dead/abandoned rhythm games", + games: [ + { id: "wacca_plus", title: "WACCA PLUS" }, + { id: "museca_plus", title: "MÚSECA PLUS" }, + { id: "rb_deluxe_plus", title: "REFLEC BEAT DELUXE PLUS" }, + ], + }, +]; + +const GameSelector = () => { + const [searchParams] = useSearchParams(); + const isMoe = searchParams.has("moe"); + + const renderCategory = (category: GameCategory) => ( +
+

{category.name}

+

{category.description}

+
+ {category.games.map(game => ( + + {game.title} + + ))} +
+
+ ); + + return ( + <> + +
+
+

+ Select a Game +

+

+ Individual game feeds keep a longer history of news relating to that game than the main feed. +

+ {gameInfo.map(renderCategory)} +
+
+ + ); +}; + +export default GameSelector; -- cgit v1.2.3