diff --git a/manager_dashboard/src/pages/Settings/tabs/Phase2FeaturesTab.jsx b/manager_dashboard/src/pages/Settings/tabs/Phase2FeaturesTab.jsx index d542cf5..964e514 100644 --- a/manager_dashboard/src/pages/Settings/tabs/Phase2FeaturesTab.jsx +++ b/manager_dashboard/src/pages/Settings/tabs/Phase2FeaturesTab.jsx @@ -1,5 +1,54 @@ +import { useState } from 'react' import { PHASE2_FEATURE_DEFS, isFeatureEnabled, setFeatureEnabled, usePhase2Features } from '../../../hooks/usePhase2Features' +const SECRET = '4034' + +function PinGate({ onUnlock }) { + const [pin, setPin] = useState('') + const [error, setError] = useState(false) + + function submit() { + if (pin === SECRET) { + onUnlock() + } else { + setError(true) + setPin('') + setTimeout(() => setError(false), 1500) + } + } + + return ( +
+
🔒
+
+

Περιορισμένη πρόσβαση

+

Εισάγετε τον κωδικό για να συνεχίσετε

+
+
+ setPin(e.target.value)} + onKeyDown={e => e.key === 'Enter' && submit()} + autoFocus + maxLength={8} + placeholder="••••" + className={`w-full text-center text-xl tracking-[0.4em] border rounded-xl px-4 py-3 outline-none transition-colors ${ + error ? 'border-red-400 bg-red-50 text-red-600' : 'border-slate-200 focus:border-sky-400' + }`} + /> + {error &&

Λάθος κωδικός

} + +
+
+ ) +} + function Toggle({ checked, onChange }) { return (