interface UserScript {
name: string;
url: string;
}
interface FlowerUserscriptModalProps {
isOpen: boolean;
onClose: () => void;
mainGameName: string;
userPage: string;
importPage: string;
scripts: UserScript[];
}
interface FlowerUserscriptCardProps {
mainGameName: string;
onClick: () => void;
}
export const FlowerUserscriptCard = ({ mainGameName, onClick }: FlowerUserscriptCardProps) => {
return (
{mainGameName} Flower/Eagle Play History (Userscript)
Import playdata from cabinets on the Flower network
)
}
const FlowerUserscriptModal = ({
isOpen,
onClose,
mainGameName,
userPage,
importPage,
scripts,
}: FlowerUserscriptModalProps) => {
if (!isOpen) return null;
const handleClose = () => {
onClose();
};
if(mainGameName === undefined){
return "Sorry, due to some extreme error the game you're looking for doesn't seem to exist..."
}
return (
{/* Backdrop */}
{/* Modal */}
{/* Header */}
Import {mainGameName} Flower/Eagle Play Data
Follow the instructions below to import your data
{/* Warning */}
You will need your ACCESS CODE to register on Flower/Eagle for the first time!
Do this by tapping your Amusement IC card at any machine on the Flower/Eagle network and copying
down the code displayed on the screen.
This is likely not the same code as the one on the back of your card.
{/* Instructions */}
Instructions:
-
Log into the{" "}
{mainGameName} Project Flower page
-
Navigate to the{" "}
{mainGameName} Play History Page
{" "}
-
Install the relevant userscript (use a browser extension such as{" "}
Violentmonkey)
{/* Additional Info */}
-
A button will appear on the page that you can click to start the scraping process.
-
Upload the resulting JSON file into Mirage using the
Batch-Manual Upload functionality
- Verify that all data has been imported correctly
{/* Actions */}
);
};
export default FlowerUserscriptModal;