From 58876529c38ee279e935c1cf3e204d2017a37a2e Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Wed, 12 Nov 2025 03:05:47 -0800 Subject: taiko: add TAL/EGTS import script --- .../components/modals/TaikoDonderHirobaModal.tsx | 4 +- frontend/src/components/modals/TaikoEGTSModal.tsx | 133 +++++++++++++++++++++ frontend/src/pages/Import.tsx | 19 ++- 3 files changed, 153 insertions(+), 3 deletions(-) create mode 100644 frontend/src/components/modals/TaikoEGTSModal.tsx (limited to 'frontend/src') diff --git a/frontend/src/components/modals/TaikoDonderHirobaModal.tsx b/frontend/src/components/modals/TaikoDonderHirobaModal.tsx index 897bd75..0f5c0a1 100644 --- a/frontend/src/components/modals/TaikoDonderHirobaModal.tsx +++ b/frontend/src/components/modals/TaikoDonderHirobaModal.tsx @@ -1,6 +1,6 @@ import type { SupportedGame } from "../../types/game"; -interface DonerHirobaModalProps { +interface DonderHirobaModalProps { isOpen: boolean; onClose: () => void; game: SupportedGame | undefined; @@ -12,7 +12,7 @@ const TaikoDonderHirobaModal = ({ onClose, game, renderAsCard, -}: DonerHirobaModalProps) => { +}: DonderHirobaModalProps) => { if (renderAsCard) { return (
diff --git a/frontend/src/components/modals/TaikoEGTSModal.tsx b/frontend/src/components/modals/TaikoEGTSModal.tsx new file mode 100644 index 0000000..45d47bf --- /dev/null +++ b/frontend/src/components/modals/TaikoEGTSModal.tsx @@ -0,0 +1,133 @@ +import type { SupportedGame } from "../../types/game"; + +interface TaikoEGTSModalProps { + isOpen: boolean; + onClose: () => void; + game: SupportedGame | undefined; + renderAsCard?: () => void; +} + +const TaikoEGTSModal = ({ + isOpen, + onClose, + game, + renderAsCard, +}: TaikoEGTSModalProps) => { + if (renderAsCard) { + return ( +
+
+ + + +
+

EGTS/TaikoLocalServer Import

+

+ Import Play History from EGTS Legacy WebUI or a local TaikoLocalServer instance +

+ +
+ ); + } + + if (!isOpen) return null; + + const handleClose = () => { + onClose(); + }; + if (game === undefined) { + return "Sorry, due to some extreme error the game you're looking for doesn't seem to exist..."; + } + return ( +
+ {/* Backdrop */} +
+ + {/* Modal */} +
+
+ {/* Header */} +
+

+ Import {game.formattedName} EGTS Data +

+

+ Follow the instructions below to import your data +

+
+ {/* Warning */} +
+

+ Before exporting ensure that the display language of Songs is set to Japanese, or is consistent with your other imports so that your data is consistent. +

+
+ + + {/* Instructions */} +
+

+ Instructions: +

+
    +
  1. Log into your the WebUI. Its assumed you already know the link if you're using this import method
  2. +
  3. + Install the appropriate userscript to your browser (use an extension such + as Tampermonkey). +
  4. + {/* Additional Info */} + +
  5. + On the WebUI, navigate to the "Play History" page and refresh. +
  6. +
  7. + A button will appear on the page that you can click to start the scraping process. +
  8. +
  9. Upload the resulting JSON file into Mirage using the Batch-Manual Upload functionality
  10. +
  11. Verify that all data has been imported correctly
  12. +
+
+ + + {/* Actions */} +
+ +
+
+
+
+ ); +}; + +export default TaikoEGTSModal; diff --git a/frontend/src/pages/Import.tsx b/frontend/src/pages/Import.tsx index b4d80a8..21bc580 100644 --- a/frontend/src/pages/Import.tsx +++ b/frontend/src/pages/Import.tsx @@ -8,13 +8,14 @@ import { uploadScore } from "../utils/scoreUpload"; import { NavBar } from "../components/NavBar"; import { EamusementUserscriptCard } from "../components/modals/EamusementUserscriptModal"; import { FlowerUserscriptCard } from "../components/modals/FlowerUserscriptModal"; -import TaikoDonderHirobaModal from "../components/modals/TaikoDonderHirobaModal"; const JsonUploadModal = lazy(() => import("../components/modals/JsonUploadModal")); const EamusementUserscriptModal = lazy(() => import("../components/modals/EamusementUserscriptModal")); const DivaNetModal = lazy(() => import("../components/modals/DivaNetModal")); const MusicDiverModal = lazy(() => import("../components/modals/MusicDiverModal")); const FlowerUserscriptModal = lazy(() => import("../components/modals/FlowerUserscriptModal")); +const TaikoDonderHirobaModal = lazy(() => import("../components/modals/TaikoDonderHirobaModal")); +const TaikoEGTSModal = lazy(() => import("../components/modals/TaikoEGTSModal")); type ModalType = 'json' | 'dancerush' | 'dancearound' | 'divanet' | 'musicdiver' | 'nostalgia' | 'reflecbeat' | 'taiko'; @@ -207,6 +208,12 @@ const Import = () => { game={supportedGames.find((g) => g.internalName === selectedGame)} renderAsCard={() => setOpenModal('taiko')} /> + {}} + game={supportedGames.find((g) => g.internalName === selectedGame)} + renderAsCard={() => setOpenModal('taiko')} + /> ); default: @@ -405,6 +412,16 @@ const Import = () => { } /> )} + {openModal === 'taiko' && ( + setOpenModal(null)} + game={ + supportedGames.find((g) => g.internalName === selectedGame) || + undefined + } + /> + )}
); -- cgit v1.2.3