From 806743b76b936ce2a8e442a62407ecd64bdc4fa1 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 26 Oct 2025 13:53:23 -0700 Subject: add music diver mypage userscript import modal --- frontend/src/components/modals/MusicDiverModal.tsx | 24 ++++++++++++------- frontend/src/pages/Import.tsx | 27 +++++++++++++++++++--- scripts/musicdiver/README.md | 5 ++-- 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/modals/MusicDiverModal.tsx b/frontend/src/components/modals/MusicDiverModal.tsx index a8672fc..0113bf5 100644 --- a/frontend/src/components/modals/MusicDiverModal.tsx +++ b/frontend/src/components/modals/MusicDiverModal.tsx @@ -16,9 +16,9 @@ const MusicDiverMyPageModal = ({ if (renderAsCard) { return (
-
+

- Import Play History via MUSIC DIVER MyPage + Import Play History via MUSIC DIVER MyPage (with and without Diver Pass)

@@ -75,6 +75,14 @@ const MusicDiverMyPageModal = ({ Follow the instructions below to import your data

+ {/* Warning */} +
+

+ You need to be subscribed to Diver Pass to view playdata beyond the last 5 charts played.
+ You can purchase Diver Pass on MUSIC DIVER cabinets after carding in. +

+
+ {/* Instructions */}
@@ -84,20 +92,20 @@ const MusicDiverMyPageModal = ({
  1. Log into your MUSIC DIVER MyPage account
  2. - Navigate to the Play History (プレイ履歴) Page + Click the 3 dots on the top right Navigate to the Record Page
  3. Install the appropriate userscript to your browser (use an extension such as Tampermonkey).
  4. {/* Additional Info */} -
    + diff --git a/frontend/src/pages/Import.tsx b/frontend/src/pages/Import.tsx index 0de1b2d..c72f597 100644 --- a/frontend/src/pages/Import.tsx +++ b/frontend/src/pages/Import.tsx @@ -10,6 +10,7 @@ const JsonUploadModal = lazy(() => import("../components/modals/JsonUploadModal" const DancerushModal = lazy(() => import("../components/modals/DancerushModal")); const DanceAroundModal = lazy(() => import("../components/modals/DanceAroundModal")); const DivaNetModal = lazy(() => import("../components/modals/DivaNetModal")); +const MusicDiverModal = lazy(() => import("../components/modals/MusicDiverModal")); const Import = () => { const { user, isLoading, logout } = useAuth(); @@ -19,6 +20,7 @@ const Import = () => { const [isDancerushModalOpen, setIsDancerushModalOpen] = useState(false); const [isDanceAroundModalOpen, setIsDanceAroundModalOpen] = useState(false); const [isDivaNetModalOpen, setIsDivaNetModalOpen] = useState(false); + const [isMusicDiverModalOpen, setIsMusicDiverModalOpen] = useState(false); const [supportedGames, setSupportedGames] = useState([]); const [gamesLoading, setGamesLoading] = useState(true); const [uploadStatus, setUploadStatus] = useState<{ @@ -142,7 +144,6 @@ const Import = () => { /> ); - break; case "dancearound": return ( <> @@ -155,7 +156,6 @@ const Import = () => { /> ); - break; case "diva": return ( <> @@ -168,7 +168,18 @@ const Import = () => { /> ); - break; + case "musicdiver": + return ( + <> + + {}} + game={supportedGames.find((g) => g.internalName === selectedGame)} + renderAsCard={() => setIsMusicDiverModalOpen(true)} + /> + + ); default: return ; } @@ -318,6 +329,16 @@ const Import = () => { } /> )} + {isMusicDiverModalOpen && ( + setIsMusicDiverModalOpen(false)} + game={ + supportedGames.find((g) => g.internalName === selectedGame) || + undefined + } + /> + )}
    ); diff --git a/scripts/musicdiver/README.md b/scripts/musicdiver/README.md index 43a2e09..c1316d0 100644 --- a/scripts/musicdiver/README.md +++ b/scripts/musicdiver/README.md @@ -2,8 +2,7 @@ Score Page: https://mypage.musicdiver.jp/record?view=history -** Currently scripts are untested with DIVER PASS ** -- Without DIVER PASS, you are limited to viewing only the last 5 plays +- Without DIVER PASS, you are limited to only the last 5 plays *Scripts Available:* -- [Recently Played History. Last 5 Scores](./musicdiver_recent_history.user.js) \ No newline at end of file +- [Recently Played History](./musicdiver_recent_history.user.js) -- cgit v1.2.3