Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update frontend/src/pages/Register.jsx
Browse files- frontend/src/pages/Register.jsx +28 -20
frontend/src/pages/Register.jsx
CHANGED
|
@@ -256,27 +256,35 @@ export const Register = () => {
|
|
| 256 |
</div>
|
| 257 |
</div>
|
| 258 |
|
| 259 |
-
{/* Password Validation Checklist */}
|
| 260 |
-
|
| 261 |
-
<div className=
|
| 262 |
-
<
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
<
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
<
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
</div>
|
| 279 |
-
|
| 280 |
|
| 281 |
{/* Agreement */}
|
| 282 |
<div className="flex items-start gap-3 mt-2">
|
|
|
|
| 256 |
</div>
|
| 257 |
</div>
|
| 258 |
|
| 259 |
+
{/* Password Validation Checklist - Only shown when typing password */}
|
| 260 |
+
{password.length > 0 && (
|
| 261 |
+
<div className="flex flex-col gap-1.5 p-3 bg-white border border-slate-200 rounded-xl text-xs animate-fade-in">
|
| 262 |
+
<div className={`flex items-center gap-2 font-medium transition-colors ${password.length >= 8 ? 'text-emerald-600 font-semibold' : 'text-slate-500'}`}>
|
| 263 |
+
<span className="material-symbols-outlined text-[16px]">
|
| 264 |
+
{password.length >= 8 ? 'check_circle' : 'radio_button_unchecked'}
|
| 265 |
+
</span>
|
| 266 |
+
<span>At least 8 characters</span>
|
| 267 |
+
</div>
|
| 268 |
+
<div className={`flex items-center gap-2 font-medium transition-colors ${/[A-Z]/.test(password) ? 'text-emerald-600 font-semibold' : 'text-slate-500'}`}>
|
| 269 |
+
<span className="material-symbols-outlined text-[16px]">
|
| 270 |
+
{/[A-Z]/.test(password) ? 'check_circle' : 'radio_button_unchecked'}
|
| 271 |
+
</span>
|
| 272 |
+
<span>One uppercase letter</span>
|
| 273 |
+
</div>
|
| 274 |
+
<div className={`flex items-center gap-2 font-medium transition-colors ${/[a-z]/.test(password) ? 'text-emerald-600 font-semibold' : 'text-slate-500'}`}>
|
| 275 |
+
<span className="material-symbols-outlined text-[16px]">
|
| 276 |
+
{/[a-z]/.test(password) ? 'check_circle' : 'radio_button_unchecked'}
|
| 277 |
+
</span>
|
| 278 |
+
<span>One lowercase letter</span>
|
| 279 |
+
</div>
|
| 280 |
+
<div className={`flex items-center gap-2 font-medium transition-colors ${/[^A-Za-z0-9]/.test(password) ? 'text-emerald-600 font-semibold' : 'text-slate-500'}`}>
|
| 281 |
+
<span className="material-symbols-outlined text-[16px]">
|
| 282 |
+
{/[^A-Za-z0-9]/.test(password) ? 'check_circle' : 'radio_button_unchecked'}
|
| 283 |
+
</span>
|
| 284 |
+
<span>One special character</span>
|
| 285 |
+
</div>
|
| 286 |
</div>
|
| 287 |
+
)}
|
| 288 |
|
| 289 |
{/* Agreement */}
|
| 290 |
<div className="flex items-start gap-3 mt-2">
|