File size: 2,660 Bytes
6711fd5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | import { Loader2, Package, Sparkles, Zap } from "lucide-react";
import { Badge } from "./badge";
interface LoadingScreenProps {
message?: string;
fullScreen?: boolean;
}
export const LoadingScreen = ({
message = "جاري التحميل...",
fullScreen = false
}: LoadingScreenProps) => {
const containerClass = fullScreen
? "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"
: "flex items-center justify-center p-8";
return (
<div className={containerClass}>
<div className="flex flex-col items-center justify-center space-y-6">
{/* Logo Animation */}
<div className="relative">
<div className="w-20 h-20 relative">
<Package className="w-full h-full text-primary animate-pulse" />
{/* Rotating Border */}
<div className="absolute inset-0 border-4 border-transparent border-t-primary border-r-accent rounded-full animate-spin" />
{/* Sparkles */}
<Sparkles className="absolute -top-2 -right-2 w-6 h-6 text-accent animate-bounce" />
<Zap className="absolute -bottom-1 -left-1 w-4 h-4 text-primary-glow animate-pulse" />
</div>
</div>
{/* Version Badge */}
<Badge variant="default" className="neon-gradient font-minecraft text-sm px-4 py-2">
<Sparkles className="w-3 h-3 mr-2 animate-spin" />
الإصدار 2.02
</Badge>
{/* Loading Text */}
<div className="text-center space-y-2">
<h3 className="text-xl font-minecraft text-primary-glow animate-glow-pulse">
خزنة الإضافات
</h3>
<div className="flex items-center gap-2 text-muted-foreground">
<Loader2 className="w-4 h-4 animate-spin" />
<span className="text-sm">{message}</span>
</div>
</div>
{/* Progress Dots */}
<div className="flex space-x-2 rtl:space-x-reverse">
{[0, 1, 2].map((i) => (
<div
key={i}
className={`w-2 h-2 bg-primary rounded-full animate-pulse`}
style={{
animationDelay: `${i * 0.2}s`,
animationDuration: '1s'
}}
/>
))}
</div>
{/* Loading Messages */}
<div className="text-center max-w-sm">
<p className="text-xs text-muted-foreground leading-relaxed">
نقوم بتحضير أفضل تجربة لك مع آلاف الإضافات المذهلة لماين كرافت
</p>
</div>
</div>
</div>
);
}; |