This commit is contained in:
2025-12-07 18:17:33 +00:00
parent 97be16c3c3
commit d33dbd110e
6 changed files with 472 additions and 30 deletions
+7 -1
View File
@@ -6,6 +6,7 @@ import MainLayout from '@/components/MainLayout';
import MatrixCursor from '@/components/MatrixCursor';
import { VERIFIED_KEY, BYPASS_KEY } from '@/components/HumanVerification';
import { useSettings } from '@/contexts/SettingsContext';
import { useAchievements } from '@/contexts/AchievementsContext';
import { useKonamiCode } from '@/hooks/useKonamiCode';
import { toast } from '@/hooks/use-toast';
@@ -33,6 +34,7 @@ const Index = () => {
const [showConsentModal, setShowConsentModal] = useState(false);
const [konamiActive, setKonamiActive] = useState(false);
const { crtEnabled, playSound } = useSettings();
const { unlockAchievement } = useAchievements();
const { activated: konamiActivated, reset: resetKonami } = useKonamiCode();
const location = useLocation();
@@ -45,6 +47,9 @@ const Index = () => {
if (konamiActivated) {
setKonamiActive(true);
// Unlock achievement
unlockAchievement('konami_master');
// Play special sound sequence
playSound('success');
setTimeout(() => playSound('boot'), 200);
@@ -62,7 +67,7 @@ const Index = () => {
resetKonami();
}, 3000);
}
}, [konamiActivated, playSound, resetKonami]);
}, [konamiActivated, playSound, resetKonami, unlockAchievement]);
// Persist theme to localStorage
useEffect(() => {
@@ -95,6 +100,7 @@ const Index = () => {
const toggleTheme = () => {
setIsRedTheme(!isRedTheme);
playSound('click');
unlockAchievement('theme_switcher');
};
const handleConsentClose = () => {