From a2dd1a1f29e6513d48bc7f332f9c074e43a34d1a Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 12 Oct 2025 17:31:06 -0700 Subject: add diva.net script instructions to import page --- frontend/src/pages/Import.tsx | 83 ++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 37 deletions(-) (limited to 'frontend/src/pages') diff --git a/frontend/src/pages/Import.tsx b/frontend/src/pages/Import.tsx index 08976c7..dc88ab4 100644 --- a/frontend/src/pages/Import.tsx +++ b/frontend/src/pages/Import.tsx @@ -7,6 +7,7 @@ import SessionExpiredPopup from "../components/SessionExpiredPopup"; import type { SupportedGame } from "../types/game"; import { uploadScore } from "../utils/scoreUpload"; import { NavBar } from "../components/NavBar"; +import DivaNetModal from "../components/modals/DivaNetModal"; const Import = () => { const { user, isLoading, logout } = useAuth(); @@ -14,6 +15,7 @@ const Import = () => { const [selectedGame, setSelectedGame] = useState(""); const [isJsonModalOpen, setIsJsonModalOpen] = useState(false); const [isEamusementModalOpen, setIsEamusementModalOpen] = useState(false); + const [isDivaNetModalOpen, setIsDivaNetModalOpen] = useState(false); const [supportedGames, setSupportedGames] = useState([]); const [gamesLoading, setGamesLoading] = useState(true); const [uploadStatus, setUploadStatus] = useState<{ @@ -121,52 +123,49 @@ const Import = () => { ); - const EamusementScrapeUploadCard = () => ( - <> - {/* e-amusement Card */} -
-
- - - -
-

- e-amusement Play History -

-

- Import via scraping your playdata from KONAMI e-amusement -

- -
- - ); + // Component removed - moved to EamusementModal.tsx const renderImportOptions = () => { switch (selectedGame) { case "dancerush": return ( <> - {/* JSON Upload Card */} - + {}} + game={supportedGames.find((g) => g.internalName === selectedGame)} + renderAsCard={() => setIsEamusementModalOpen(true)} + /> ); - + break; + case "dancearound": + return ( + <> + + {}} + game={supportedGames.find((g) => g.internalName === selectedGame)} + renderAsCard={() => setIsEamusementModalOpen(true)} + /> + + ); + break; + case "diva": + return ( + <> + + {}} + game={supportedGames.find((g) => g.internalName === selectedGame)} + renderAsCard={() => setIsDivaNetModalOpen(true)} + /> + + ); + break; default: return ; } @@ -293,6 +292,16 @@ const Import = () => { undefined } /> + + {/* DivaNet Modal */} + setIsDivaNetModalOpen(false)} + game={ + supportedGames.find((g) => g.internalName === selectedGame) || + undefined + } + /> ); }; -- cgit v1.2.3