diff --git a/web3nova-revamp/components/Desk/ApplicantModal.jsx b/web3nova-revamp/components/Desk/ApplicantModal.jsx index 32afc26..4d2f1c4 100644 --- a/web3nova-revamp/components/Desk/ApplicantModal.jsx +++ b/web3nova-revamp/components/Desk/ApplicantModal.jsx @@ -44,23 +44,23 @@ export default function ApplicantModal({ matric, onClose }) { animate={{ opacity: 1 }} exit={{ opacity: 0 }} onClick={onClose} - className="fixed inset-0 bg-black/70 backdrop-blur-sm z-50 flex items-center justify-center p-4" + className="fixed inset-0 bg-black/70 backdrop-blur-sm z-50 flex items-center justify-center p-3 sm:p-4" > e.stopPropagation()} - className="bg-zinc-950 border border-zinc-800 rounded-2xl max-w-2xl w-full max-h-[85vh] overflow-auto" + className="bg-zinc-950 border border-zinc-800 rounded-2xl w-full sm:max-w-2xl max-h-[90vh] sm:max-h-[85vh] overflow-auto" > -
-

Applicant Details

+
+

Applicant Details

-
+
{error && (
{error} @@ -75,7 +75,7 @@ export default function ApplicantModal({ matric, onClose }) { {data && (
-
+
{data.photo_url ? ( @@ -83,9 +83,9 @@ export default function ApplicantModal({ matric, onClose }) { )}
-
-
{data.full_name}
-
{data.Matriculation_Number}
+
+
{data.full_name}
+
{data.Matriculation_Number}
{data.status === "admitted" ? ( admitted @@ -98,7 +98,7 @@ export default function ApplicantModal({ matric, onClose }) {
-
+
@@ -116,23 +116,23 @@ export default function ApplicantModal({ matric, onClose }) { Passkey
{!confirmReset ? ( -
-

+

+

Reset this intern's passkey so they can re-register a new device at /recovery.

) : (
-

+

Clear passkey for {data.full_name}? They'll have to set up a new one via /recovery.

-
+
+ )} +
+ + + +
+
+ + {hub?.current_ip || "not set"} +
+ {hub?.updated_at && ( +
+ updated {new Date(hub.updated_at).toLocaleString()} +
+ )} + + {syncMsg && ( +
+ {syncMsg.text} +
+ )} +
+ + + + ); +} + export default function DeskLayout({ children, title }) { const router = useRouter(); const [ready, setReady] = useState(false); const [hub, setHub] = useState(null); const [syncing, setSyncing] = useState(false); const [syncMsg, setSyncMsg] = useState(null); + const [drawerOpen, setDrawerOpen] = useState(false); useEffect(() => { if (!getToken()) { @@ -26,6 +99,9 @@ export default function DeskLayout({ children, title }) { } }, [router]); + // Close drawer on route change + useEffect(() => { setDrawerOpen(false); }, [router.pathname]); + async function syncHubIp() { setSyncing(true); setSyncMsg(null); @@ -47,78 +123,47 @@ export default function DeskLayout({ children, title }) { if (!ready) return null; + const sidebarProps = { router, hub, syncing, syncMsg, syncHubIp, logout }; + return (
- + {/* Main content */} +
+ + {/* Mobile top bar */} +
+ + {title || "Desk"} +
-
- {title &&

{title}

} - {children} -
+
+ {title &&

{title}

} + {children} +
+
); } diff --git a/web3nova-revamp/components/Internship/ApplicationForm.jsx b/web3nova-revamp/components/Internship/ApplicationForm.jsx index 94a25cb..d12bed5 100644 --- a/web3nova-revamp/components/Internship/ApplicationForm.jsx +++ b/web3nova-revamp/components/Internship/ApplicationForm.jsx @@ -25,7 +25,7 @@ const ApplicationForm = () => { const [photo, setPhoto] = useState(null); const [loading, setLoading] = useState(false); const [status, setStatus] = useState({ type: "", message: "" }); - const [step, setStep] = useState(1); // 1 = form, 2 = passkey + const [step, setStep] = useState(1); // 1 = form, 2 = passkey (enforced) const [passkeyLoading, setPasskeyLoading] = useState(false); const fileInputRef = useRef(null); @@ -246,46 +246,7 @@ const ApplicationForm = () => { )} - {step === 2 ? ( -
-
-
- -
-

Application received

-

- Now create a passkey on this device. You'll use it (fingerprint, - Face ID, or device unlock) to check in and out at the hub. -

-
- -
-
- -

Your passkey stays on this device. We never see your fingerprint or face data.

-
-
- -

Lost your device later? An admin can reset it and you can register a new one.

-
-
- - - {passkeyLoading ? ( - <> Waiting for device... - ) : ( - <> Create Passkey - )} - -
- ) : ( + {step === 1 ? (
@@ -474,6 +435,46 @@ const ApplicationForm = () => { )} + ) : ( +
+
+
+ +
+

Final Step: Secure Your Access

+

⚠️ This is mandatory to complete your registration

+

+ Create a passkey on this device. You'll use it (fingerprint, + Face ID, or device unlock) to check in and out at the hub. +

+
+ +
+
+ +

Your passkey stays on this device. We never see your fingerprint or face data.

+
+
+ +

Lost your device later? An admin can reset it and you can register a new one.

+
+
+ + + {passkeyLoading ? ( + <> Waiting for device... + ) : ( + <> Create Passkey & Complete Registration + )} + +
)}