From 6c501cc317af30e79325907de56987af055acaf2 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 20 Oct 2025 17:43:24 -0700 Subject: clean up existing links on import modals --- .../src/components/modals/DanceAroundModal.tsx | 82 ++++++------- frontend/src/components/modals/DancerushModal.tsx | 79 +++++++------ frontend/src/components/modals/DivaNetModal.tsx | 29 +++-- frontend/src/components/modals/MusicDiverModal.tsx | 128 +++++++++++++++++++++ frontend/src/types/constants.ts | 6 - 5 files changed, 226 insertions(+), 98 deletions(-) create mode 100644 frontend/src/components/modals/MusicDiverModal.tsx (limited to 'frontend/src') diff --git a/frontend/src/components/modals/DanceAroundModal.tsx b/frontend/src/components/modals/DanceAroundModal.tsx index 45f1f6f..43c71eb 100644 --- a/frontend/src/components/modals/DanceAroundModal.tsx +++ b/frontend/src/components/modals/DanceAroundModal.tsx @@ -1,5 +1,4 @@ import type { SupportedGame } from "../../types/game"; -import { EamuseImportInfo } from "../../types/constants"; interface DanceAroundModalProps { isOpen: boolean; @@ -12,7 +11,7 @@ const DanceAroundModal = ({ isOpen, onClose, game, - renderAsCard + renderAsCard, }: DanceAroundModalProps) => { if (renderAsCard) { return ( @@ -53,8 +52,8 @@ const DanceAroundModal = ({ const handleClose = () => { onClose(); }; - if(game === undefined){ - return "Sorry, due to some extreme error the game you're looking for doesn't seem to exist..." + if (game === undefined) { + return "Sorry, due to some extreme error the game you're looking for doesn't seem to exist..."; } return (
@@ -97,45 +96,50 @@ const DanceAroundModal = ({ Instructions:
    -
  1. Log into your e-amusement account
  2. - {EamuseImportInfo["dancearound"] ? ( -
  3. - Navigate to your{" "} - - Dance aROUND score data page - {" "} - Dance aROUND score data page -
  4. - ) : ( -
  5. Navigate to your Dance aROUND score data page
  6. - )} - {EamuseImportInfo["dancearound"] ? ( -
  7. - Install the userscript to your browser (use an extension such - as Tampermonkey) -
  8. - ) : ( -
  9. - Scrape the data using any method of your choice and translate - it into a Mirage Dance aROUND compatible JSON format -
  10. - )} -
  11. Upload the resulting JSON file into Mirage using the Batch-Manual Upload functionality
  12. +
  13. + Log into the{" "} + + DANCE aROUND e-amusement page + +
  14. +
  15. + Navigate to the{" "} + + DANCE aROUND Play History Page + {" "} +
  16. +
  17. + Install the relevant userscript (use a browser extension such as{" "} + Tampermonkey) +
  18. + {/* Additional Info */} +
    +

    + + e-amusement Recently Played Score Export Userscript (Last 20 Played) + +

    +
    +
  19. + A button will appear on the page that you can click to start the scraping process. +
  20. +
  21. + Upload the resulting JSON file into Mirage using the + Batch-Manual Upload functionality +
  22. Verify that all data has been imported correctly
- {/* Additional Info */} -
-

- - e-amusement Recently Played Score Export Userscript (Last 30 Played) - -

-
{/* Actions */}
diff --git a/frontend/src/components/modals/DancerushModal.tsx b/frontend/src/components/modals/DancerushModal.tsx index a13ce2a..f350a5a 100644 --- a/frontend/src/components/modals/DancerushModal.tsx +++ b/frontend/src/components/modals/DancerushModal.tsx @@ -1,5 +1,4 @@ import type { SupportedGame } from "../../types/game"; -import { EamuseImportInfo } from "../../types/constants"; interface DancerushModalProps { isOpen: boolean; @@ -70,7 +69,7 @@ const DancerushModal = ({ {/* Header */}

- Import DANCERUSH Data + Import DANCERUSH e-amusement Data

Follow the instructions below to import your data @@ -97,46 +96,50 @@ const DancerushModal = ({ Instructions:

    -
  1. Log into your e-amusement account
  2. - {EamuseImportInfo["dancerush"] ? ( -
  3. - Navigate to your{" "} - - DANCERUSH score data page - {" "} - DANCERUSH score data page -
  4. - ) : ( -
  5. Navigate to your DANCERUSH score data page
  6. - )} - {EamuseImportInfo["dancerush"] ? ( -
  7. - Install the userscript to your browser (use an extension such - as Tampermonkey) -
  8. - ) : ( -
  9. - Scrape the data using any method of your choice and translate - it into a Mirage DANCERUSH compatible JSON format -
  10. - )} -
  11. Upload the resulting JSON file into Mirage using the Batch-Manual Upload functionality
  12. +
  13. + Log into the{" "} + + DANCERUSH e-amusement page + +
  14. +
  15. + Navigate to the{" "} + + DANCERUSH Play History Page + {" "} +
  16. +
  17. + Install the relevant userscript (use a browser extension such as{" "} + Tampermonkey) +
  18. + {/* Additional Info */} +
    +

    + + e-amusement Recently Played Score Export Userscript (Last 20 Played) + +

    +
    +
  19. + A button will appear on the page that you can click to start the scraping process. +
  20. +
  21. + Upload the resulting JSON file into Mirage using the + Batch-Manual Upload functionality +
  22. Verify that all data has been imported correctly
- {/* Additional Info */} -
-

- - e-amusement Recently Played Score Export Userscript (Last 20 Played) - -

-
- {/* Actions */}
- {/* Additional Info */} -
-

- - DIVA.NET Recently Played Score Export Userscript (Last 20 Played) - -

-
{/* Actions */}
diff --git a/frontend/src/components/modals/MusicDiverModal.tsx b/frontend/src/components/modals/MusicDiverModal.tsx new file mode 100644 index 0000000..a8672fc --- /dev/null +++ b/frontend/src/components/modals/MusicDiverModal.tsx @@ -0,0 +1,128 @@ +import type { SupportedGame } from "../../types/game"; + +interface MusicDiverMyPageModalProps { + isOpen: boolean; + onClose: () => void; + game: SupportedGame | undefined; + renderAsCard?: () => void; +} + +const MusicDiverMyPageModal = ({ + isOpen, + onClose, + game, + renderAsCard +}: MusicDiverMyPageModalProps) => { + if (renderAsCard) { + return ( +
+
+ + + +
+

+ MUSIC DIVER MyPage +

+

+ Import Play History via MUSIC DIVER MyPage +

+ +
+ ); + } + + 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} Data +

+

+ Follow the instructions below to import your data +

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

+ Instructions: +

+
    +
  1. Log into your MUSIC DIVER MyPage account
  2. +
  3. + Navigate to the Play History (プレイ履歴) Page +
  4. +
  5. + Install the appropriate userscript to your browser (use an extension such + as Tampermonkey). +
  6. + {/* Additional Info */} + +
  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 MusicDiverMyPageModal; diff --git a/frontend/src/types/constants.ts b/frontend/src/types/constants.ts index 028545d..d51869e 100644 --- a/frontend/src/types/constants.ts +++ b/frontend/src/types/constants.ts @@ -1,9 +1,3 @@ -export const EamuseImportInfo: Record = { - dancerush: { - scorePage: "https://p.eagate.573.jp/game/dan/1st/playdata/entrance.html#music_data", - }, -}; - export const globalSkipKeys = [ "id", "internalname", -- cgit v1.2.3