From 8559b615734760ff060ac2c714c8fca80d5ed251 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 30 Jun 2025 00:59:25 -0700 Subject: add score import page --- frontend/src/pages/Home.tsx | 6 + frontend/src/pages/Import.tsx | 266 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 272 insertions(+) (limited to 'frontend/src/pages') diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 1d87c8a..e42a2b8 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -66,6 +66,12 @@ const Home = () => { Mirage
+ + Import Data + Welcome back, {user.username} +
+ + + + + {/* Main Content */} +
+ {/* Header */} +
+

Import Data

+

Import your game scores and progress from various sources

+
+ + {/* Status Message */} + {uploadStatus.type && ( +
+

+ {uploadStatus.message} +

+
+ )} + + {/* Game Selection Card */} +
+
+

Select Game

+

+ Choose the game you want to import data for +

+ + {gamesLoading ? ( +
+
+
+ Loading games... +
+
+ ) : ( + + )} +
+ + {/* Import Options */} + {selectedGame && ( +
+

Import Options

+ +
+ {/* JSON Upload Card */} +
+
+ + + +
+

Batch-Manual Upload

+

+ Upload your game data from a Mirage compatible JSON file +

+ +
+
+
+ )} +
+
+ + {/* JSON Upload Modal */} + setIsJsonModalOpen(false)} + onUpload={handleJsonUpload} + game={supportedGames.find(g => g.internalName === selectedGame)?.formattedName || ''} + /> + + ); +}; + +export default Import; -- cgit v1.2.3