Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CodeLens</title>
</head>
Expand Down
Binary file added frontend/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion frontend/public/favicon.svg

This file was deleted.

Binary file added frontend/public/varaint3 transparant logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 49 additions & 8 deletions frontend/src/components/auth/ForgotPassword.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { useState, useEffect } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import * as authService from '../../services/authService';
import {
validatePassword,
validateOtp,
} from "../../utils/passwordPolicy";

export default function ForgotPassword() {
const [step, setStep] = useState(1);
Expand All @@ -15,8 +19,10 @@ export default function ForgotPassword() {

const navigate = useNavigate();

const isPasswordValid = newPassword.length >= 6;
const isOtpValid = otp.trim().length === 6;
const { checks: passwordChecks, isValid: isPasswordValid } =
validatePassword(newPassword);

const isOtpValid = validateOtp(otp);

const doPasswordsMatch =
confirmPassword.length > 0 && newPassword === confirmPassword;
Expand Down Expand Up @@ -80,7 +86,9 @@ export default function ForgotPassword() {
}

if (!isPasswordValid) {
setError("Password must be at least 6 characters");
setError(
"Password must be at least 8 characters long and include an uppercase letter, lowercase letter, number, and special character."
);
return;
}

Expand Down Expand Up @@ -120,9 +128,19 @@ export default function ForgotPassword() {
return (
<div className="w-full flex-1 flex flex-col items-center justify-center px-4 sm:px-6 md:px-8 py-12 sm:py-20 bg-white">
<div className="w-full max-w-md border-4 border-black p-6 sm:p-8 md:p-12 bg-white shadow-[8px_8px_0_0_rgba(0,0,0,1)] md:shadow-[16px_16px_0_0_rgba(0,0,0,1)]">
<h2 className="text-3xl sm:text-4xl md:text-5xl font-black uppercase tracking-tighter text-black mb-8 sm:mb-12">
RESET PASSWORD
</h2>

{/* CodeLens Logo */}
<div className="flex justify-center mb-8">
<img
src="/varaint3 transparant logo.png"
alt="CodeLens"
className="h-12 sm:h-14 w-auto"
/>
</div>

<h2 className="text-3xl sm:text-4xl md:text-5xl font-black uppercase tracking-tighter text-black mb-8 sm:mb-12">
RESET PASSWORD
</h2>

{error && (
<div className="mb-8 border-4 border-red-600 bg-red-50 p-4">
Expand Down Expand Up @@ -253,7 +271,7 @@ export default function ForgotPassword() {
<input
type="password"
autoComplete="new-password"
minLength={6}
minLength={8}
aria-invalid={newPassword.length > 0 && !isPasswordValid}
value={newPassword}
id="new-password"
Expand All @@ -268,12 +286,35 @@ export default function ForgotPassword() {
role="alert"
className="text-xs font-black uppercase tracking-widest text-red-600"
>
Password must be at least 6 characters
Password must be at least 8 characters and contain uppercase,
lowercase, number, and special character
</p>
)}
</div>
</div>

<ul className="text-xs space-y-1">
<li className={passwordChecks.length ? "text-green-600" : "text-gray-500"}>
{passwordChecks.length ? "βœ“" : "βœ—"} Minimum 8 characters
</li>

<li className={passwordChecks.uppercase ? "text-green-600" : "text-gray-500"}>
{passwordChecks.uppercase ? "βœ“" : "βœ—"} One uppercase letter (A-Z)
</li>

<li className={passwordChecks.lowercase ? "text-green-600" : "text-gray-500"}>
{passwordChecks.lowercase ? "βœ“" : "βœ—"} One lowercase letter (a-z)
</li>

<li className={passwordChecks.number ? "text-green-600" : "text-gray-500"}>
{passwordChecks.number ? "βœ“" : "βœ—"} One number (0-9)
</li>

<li className={passwordChecks.special ? "text-green-600" : "text-gray-500"}>
{passwordChecks.special ? "βœ“" : "βœ—"} One special character (!@#$%^&*)
</li>
</ul>

<div className="flex flex-col space-y-3">
<label
htmlFor="confirm-password"
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/components/shared/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ export default function Footer() {
<div className="md:col-span-2 xl:col-span-1 flex flex-col gap-6 border-b-4 border-black pb-10 md:border-b-0 md:pb-0 md:border-r-4 md:pr-10 xl:border-r-4 xl:pr-8">
<Link
to="/"
className="text-5xl font-black tracking-tighter uppercase text-black leading-none hover:opacity-70 transition-opacity"
className="hover:opacity-70 transition-opacity"
>
CODE<br />LENS
<img
src="/varaint3 transparant logo.png"
alt="CodeLens"
className="h-24 w-auto"
/>
</Link>
<p className="text-sm font-bold tracking-widest uppercase leading-relaxed text-black max-w-xs">
The developer intelligence platform. Unify your competitive programming journey across Codeforces, LeetCode &amp; GitHub β€” with AI-driven insights, zero noise.
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/components/shared/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,17 @@ export default function Navbar() {
<div className="max-w-[1400px] mx-auto flex items-center justify-between px-4 sm:px-6 lg:px-8 h-14 gap-4">

{/* ── Wordmark ──────────────────────────────────────────────────── */}
{/* ── Logo ─────────────────────────────────────────────────────── */}
<Link
to="/"
onClick={closeMenu}
className="text-lg font-black tracking-tighter uppercase text-black hover:opacity-60 transition-opacity flex-shrink-0"
className="flex items-center flex-shrink-0 hover:opacity-80 transition-opacity"
>
CODELENS
<img
src="/varaint3 transparant logo.png"
alt="CodeLens"
className="h-8 w-auto"
/>
</Link>

{/* ── Desktop Centre Nav ────────────────────────────────────────── */}
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/shared/loaders/LoaderAlt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ const Spinner = () => {
<div
role="status"
aria-live="polite"
className="min-h-screen flex items-center justify-center bg-white"
className="min-h-screen flex flex-col items-center justify-center bg-white"
>
<span className="sr-only">Loading, please wait...</span>
{/* CodeLens Logo */}
<img
src="/favicon.png"
alt="CodeLens"
className="h-12 w-12 mb-8"
/>
<div className="grid grid-cols-2 gap-3">
{[...Array(4)].map((_, i) => (
<div
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/components/shared/loaders/LoaderPrimary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ const Spinner = () => {
<div
role="status"
aria-live="polite"
className="min-h-screen flex items-center justify-center bg-white overflow-hidden"
className="min-h-screen flex flex-col items-center justify-center bg-white overflow-hidden"
>
<span className="sr-only">Loading, please wait...</span>

{/* CodeLens Logo */}
<img
src="/favicon.png"
alt="CodeLens"
className="w-12 h-12 mb-8"
/>

<div className="relative w-32 h-32 animate-rotate">
{/* Outer Square */}
<div className="absolute inset-0 border-[5px] border-black animate-scale-1" />
Expand Down
12 changes: 11 additions & 1 deletion frontend/src/pages/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,18 @@ export default function LoginPage() {
return (
<div className="w-full flex-1 flex flex-col items-center justify-center px-4 sm:px-6 md:px-8 py-12 sm:py-20 bg-white">
<div className="w-full max-w-md border-4 border-black p-6 sm:p-8 md:p-12 bg-white shadow-[8px_8px_0_0_rgba(0,0,0,1)] md:shadow-[16px_16px_0_0_rgba(0,0,0,1)]">

{/* Logo */}
<div className="flex justify-center mb-8">
<img
src="/varaint3 transparant logo.png"
alt="CodeLens"
className="h-12 sm:h-14 w-auto"
/>
</div>

<h2 className="text-3xl sm:text-4xl md:text-5xl font-black uppercase tracking-tighter text-black mb-8 sm:mb-12">
LOGIN
LOGIN
</h2>

{error && (
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/pages/NotFoundPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ export default function NotFoundPage() {
<div className="relative z-10 flex h-full flex-col justify-between">
{/* Label */}
<div>
{/* CodeLens Logo */}
<img
src="/varaint3 transparant logo.png"
alt="CodeLens"
className="h-12 sm:h-14 w-auto mb-8"
/>
Comment on lines +32 to +37

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical | ⚑ Quick win

Fix critical typos in logo filename.

The image source path contains two spelling errors that will prevent the logo from loading:

  • varaint3 should be variant3
  • transparant should be transparent
πŸ› Proposed fix for filename typos
-              src="/varaint3 transparant logo.png"
+              src="/variant3 transparent logo.png"
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{/* CodeLens Logo */}
<img
src="/varaint3 transparant logo.png"
alt="CodeLens"
className="h-12 sm:h-14 w-auto mb-8"
/>
{/* CodeLens Logo */}
<img
src="/variant3 transparent logo.png"
alt="CodeLens"
className="h-12 sm:h-14 w-auto mb-8"
/>
πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/pages/NotFoundPage.jsx` around lines 32 - 37, The img element in
the NotFoundPage component has two typos in its src string; update the src used
by the <img> (the CodeLens logo) to correct "varaint3" to "variant3" and
"transparant" to "transparent" so the filename matches the actual asset name.


<p className="text-xs font-black uppercase tracking-[0.35em] text-black sm:text-sm">
Error / Route Unavailable
Error / Route Unavailable
</p>
</div>

Expand Down
Loading