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/components/modals/DivaNetModal.tsx | 128 ++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 frontend/src/components/modals/DivaNetModal.tsx (limited to 'frontend/src/components/modals/DivaNetModal.tsx') diff --git a/frontend/src/components/modals/DivaNetModal.tsx b/frontend/src/components/modals/DivaNetModal.tsx new file mode 100644 index 0000000..f38913b --- /dev/null +++ b/frontend/src/components/modals/DivaNetModal.tsx @@ -0,0 +1,128 @@ +import type { SupportedGame } from "../../types/game"; + +interface DivaNetModalProps { + isOpen: boolean; + onClose: () => void; + game: SupportedGame | undefined; + renderAsCard?: () => void; +} + +const DivaNetModal = ({ + isOpen, + onClose, + game, + renderAsCard +}: DivaNetModalProps) => { + if (renderAsCard) { + return ( +
+
+ + + +
+

+ DIVA.NET Play History +

+

+ Import via scraping your playdata from SEGA DIVA.NET +

+ +
+ ); + } + + 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 DIVA.NET account
  2. +
  3. + Navigate to the Play History (履歴) Page +
  4. +
  5. + Install the userscript to your browser (use an extension such + as Tampermonkey). +
  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. +
+
+ + {/* Additional Info */} + + + {/* Actions */} +
+ +
+
+
+
+ ); +}; + +export default DivaNetModal; -- cgit v1.2.3