From f136abe17e7a46ae411f395bbee27309004965b8 Mon Sep 17 00:00:00 2001 From: bonamin Date: Mon, 8 Jun 2026 04:03:37 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20PIN=20gate=20on=20=CE=9B=CE=B5=CE=B9?= =?UTF-8?q?=CF=84=CE=BF=CF=85=CF=81=CE=B3=CE=AF=CE=B5=CF=82=20settings=20t?= =?UTF-8?q?ab=20(code:=204034)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../pages/Settings/tabs/Phase2FeaturesTab.jsx | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) 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 (