diff --git a/src/components/PlaySection.tsx b/src/components/PlaySection.tsx index b0109fe..5c05a32 100644 --- a/src/components/PlaySection.tsx +++ b/src/components/PlaySection.tsx @@ -1,110 +1,71 @@ -import React, { useState } from 'react' -import { Play, Loader2, Info, ExternalLink } from 'lucide-react' -import { launcherService, type GameVersion } from '../services/LauncherService' -import { motion } from 'framer-motion' +import React, { useState } from "react"; +import { Play, Loader2 } from "lucide-react"; +import { launcherService, type GameVersion } from "../services/LauncherService"; interface PlaySectionProps { - version: GameVersion + version: GameVersion; } const PlaySection: React.FC = ({ version }) => { - const [isLaunching, setIsLaunching] = useState(false) - const [launchStatus, setLaunchStatus] = useState('') + const [isLaunching, setIsLaunching] = useState(false); + const [launchStatus, setLaunchStatus] = useState(""); const handleLaunch = async () => { - setIsLaunching(true) - setLaunchStatus('Preparing...') - + setIsLaunching(true); + setLaunchStatus("Preparing..."); + // Simulate launch steps - setTimeout(() => setLaunchStatus('Verifying assets...'), 500) - setTimeout(() => setLaunchStatus('Applying Saturn optimizations...'), 1200) - - const result = await launcherService.launchGame(version.id) - + setTimeout(() => setLaunchStatus("Verifying assets..."), 500); + setTimeout(() => setLaunchStatus("Applying Saturn optimizations..."), 1200); + + const result = await launcherService.launchGame(version.id); + if (result.success) { - setLaunchStatus('Game running') + setLaunchStatus("Game running"); // In a real app, we might minimize or close the launcher here } - + setTimeout(() => { - setIsLaunching(false) - setLaunchStatus('') - }, 3000) - } + setIsLaunching(false); + setLaunchStatus(""); + }, 3000); + }; return ( -
- -

- SATURN -

-

- Fabric-Only Optimization Client -

-
+
+ {/* Background Image */} + Background -
-
-
- -
-
-

Instance

-

Saturn Default

-
+ {/* Centered Overlay */} +
+
+
+ +
- -
-
- -
-
-

Current Version

-

{version.name}

-
-
- -
-
- -
-
-

Modloader

-

Fabric Loader

-
-
-
- -
-
- -
- -
-

Saturn Client is not affiliated with Mojang AB. Use at your own risk. Performance may vary based on hardware.

- ) -} + ); +}; -export default PlaySection +export default PlaySection;