fix(ui): clear password error after lockout and fix share page scrolling
All checks were successful
Automated Container Build / build-and-push (push) Successful in 45s

This commit is contained in:
Elijah 2026-05-23 17:20:06 -07:00
parent 7d3f3088ef
commit e00fac24cb

View file

@ -29,7 +29,10 @@ export default function PublicSharePage({ params }: { params: Promise<{ id: stri
useEffect(() => { useEffect(() => {
if (lockoutTime <= 0) return; if (lockoutTime <= 0) return;
const timer = setInterval(() => { const timer = setInterval(() => {
setLockoutTime(prev => Math.max(0, prev - 1)); setLockoutTime(prev => {
if (prev <= 1) setPasswordError(null);
return Math.max(0, prev - 1);
});
}, 1000); }, 1000);
return () => clearInterval(timer); return () => clearInterval(timer);
}, [lockoutTime]); }, [lockoutTime]);
@ -185,7 +188,7 @@ export default function PublicSharePage({ params }: { params: Promise<{ id: stri
const pathParts = currentPath.split('/').filter(Boolean); const pathParts = currentPath.split('/').filter(Boolean);
return ( return (
<div className="min-h-screen p-4 md:p-8 bg-gradient-to-br from-[#0f172a] to-[#1e1b4b] text-white flex flex-col items-center"> <div className="h-screen overflow-y-auto p-4 md:p-8 bg-gradient-to-br from-[#0f172a] to-[#1e1b4b] text-white flex flex-col items-center">
<div className={`w-full ${fileInfo?.is_dir ? 'max-w-4xl' : 'max-w-md'} transition-all duration-500`}> <div className={`w-full ${fileInfo?.is_dir ? 'max-w-4xl' : 'max-w-md'} transition-all duration-500`}>
{/* Header/Card */} {/* Header/Card */}