From f36aafeb37eebb76241e642bb87041837b3e5a0f Mon Sep 17 00:00:00 2001 From: prajwalism Date: Thu, 4 Jul 2024 13:02:56 +0545 Subject: [PATCH 1/6] feat: add back button in forgot password section --- src/frontend/src/App.tsx | 2 +- .../src/components/Authentication/ForgotPassword/index.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 21fd43c8..1220cd19 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -47,7 +47,7 @@ export default function App() { }; // add routes where you dont want navigation bar - const routesWithoutNavbar = ['/login', '/']; + const routesWithoutNavbar = ['/', '/login', '/forgot-password']; return ( <> diff --git a/src/frontend/src/modules/user-auth-module/src/components/Authentication/ForgotPassword/index.tsx b/src/frontend/src/modules/user-auth-module/src/components/Authentication/ForgotPassword/index.tsx index cb48d195..e987d6df 100644 --- a/src/frontend/src/modules/user-auth-module/src/components/Authentication/ForgotPassword/index.tsx +++ b/src/frontend/src/modules/user-auth-module/src/components/Authentication/ForgotPassword/index.tsx @@ -76,11 +76,14 @@ export default function ForgotPassword() { - + + From 8f80d17824fd320d14484f4bdcd0ef6288e0ebaa Mon Sep 17 00:00:00 2001 From: prajwalism Date: Thu, 4 Jul 2024 13:54:11 +0545 Subject: [PATCH 3/6] refactor: design changes in login page --- .../components/Authentication/Login/index.tsx | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/frontend/src/modules/user-auth-module/src/components/Authentication/Login/index.tsx b/src/frontend/src/modules/user-auth-module/src/components/Authentication/Login/index.tsx index 78b84144..01ea5428 100644 --- a/src/frontend/src/modules/user-auth-module/src/components/Authentication/Login/index.tsx +++ b/src/frontend/src/modules/user-auth-module/src/components/Authentication/Login/index.tsx @@ -72,7 +72,7 @@ export default function Login() { className="naxatw-h-screen naxatw-w-full naxatw-flex-col naxatw-items-center naxatw-justify-center" > -

Sign In - {signInAs}

+

{signInAs}

{/* google login button */}
setOnSignUpBtnClick(true)} > - Sign in with Google + Continue with Google
{/* google login button */} + +
+ or +
+
+
- + - + handleShow()} /> @@ -131,7 +144,6 @@ export default function Login() { Forgot Your Password? - From c87cd6ab242a256ddd17826fbd043c8f94f8e0eb Mon Sep 17 00:00:00 2001 From: prajwalism Date: Thu, 4 Jul 2024 14:02:37 +0545 Subject: [PATCH 4/6] feat: navigate to projects sections if user is already logged in --- .../components/LandingPage/SignInOverlay/index.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx b/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx index c7b37a07..ef5add16 100644 --- a/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx +++ b/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx @@ -1,4 +1,5 @@ import { useTypedDispatch } from '@Store/hooks'; +import useAuth from '@Hooks/useAuth'; import { useNavigate } from 'react-router-dom'; import { FlexColumn, FlexRow } from '@Components/common/Layouts'; import { Button } from '@Components/RadixComponents/Button'; @@ -14,6 +15,7 @@ import { slideVariants } from '@Constants/animations'; export default function SignInOverlay() { const dispatch = useTypedDispatch(); const navigate = useNavigate(); + const { isAuthenticated } = useAuth(); return ( { dispatch(setCommonState({ signInAs: 'Project Creator' })); - navigate('/login'); + if (isAuthenticated()) { + navigate('/projects'); + } else { + navigate('/login'); + } }} > I'm a Project Creator @@ -62,7 +68,11 @@ export default function SignInOverlay() { rightIcon="east" onClick={() => { dispatch(setCommonState({ signInAs: 'Drone Operator' })); - navigate('/login'); + if (isAuthenticated()) { + navigate('/projects'); + } else { + navigate('/login'); + } }} > I'm a Drone Operator From 0f845ab9f843052138d412d454d6de7249efa9b8 Mon Sep 17 00:00:00 2001 From: prajwalism Date: Thu, 4 Jul 2024 15:20:55 +0545 Subject: [PATCH 5/6] feat: change the dtm logo to red in navbar and signin overlay of landing pagwe --- src/frontend/src/assets/images/DTM-logo-white.svg | 12 ++++++++++++ .../src/components/LandingPage/Home/index.tsx | 2 +- .../components/LandingPage/SignInOverlay/index.tsx | 2 +- src/frontend/src/components/common/Navbar/index.tsx | 8 ++++++-- 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 src/frontend/src/assets/images/DTM-logo-white.svg diff --git a/src/frontend/src/assets/images/DTM-logo-white.svg b/src/frontend/src/assets/images/DTM-logo-white.svg new file mode 100644 index 00000000..1bb4c0f9 --- /dev/null +++ b/src/frontend/src/assets/images/DTM-logo-white.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/frontend/src/components/LandingPage/Home/index.tsx b/src/frontend/src/components/LandingPage/Home/index.tsx index bcd40eee..8cce815b 100644 --- a/src/frontend/src/components/LandingPage/Home/index.tsx +++ b/src/frontend/src/components/LandingPage/Home/index.tsx @@ -3,7 +3,7 @@ import { FlexColumn } from '@Components/common/Layouts'; import Image from '@Components/RadixComponents/Image'; import { Button } from '@Components/RadixComponents/Button'; import { motion } from 'framer-motion'; -import droneTaskingManagerLogo from '@Assets/images/LandingPage/DTM-logo-red.svg'; +import droneTaskingManagerLogo from '@Assets/images/DTM-logo-white.svg'; import droneBackgroundImage from '@Assets/images/LandingPage/DroneTM-bg.png'; import arrowSouth from '@Assets/images/LandingPage/arrow_south.svg'; import { setCommonState } from '@Store/actions/common'; diff --git a/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx b/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx index ef5add16..c02ebd84 100644 --- a/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx +++ b/src/frontend/src/components/LandingPage/SignInOverlay/index.tsx @@ -4,7 +4,7 @@ import { useNavigate } from 'react-router-dom'; import { FlexColumn, FlexRow } from '@Components/common/Layouts'; import { Button } from '@Components/RadixComponents/Button'; import Image from '@Components/RadixComponents/Image'; -import droneTMLogo from '@Assets/images/LandingPage/dtm-logo-red.svg'; +import droneTMLogo from '@Assets/images/LandingPage/DTM-logo-red.svg'; import projectCreator from '@Assets/images/LandingPage/project-creator.svg'; import droneOperator from '@Assets/images/LandingPage/drone-operator.svg'; import Icon from '@Components/common/Icon'; diff --git a/src/frontend/src/components/common/Navbar/index.tsx b/src/frontend/src/components/common/Navbar/index.tsx index adad3168..eb12dace 100644 --- a/src/frontend/src/components/common/Navbar/index.tsx +++ b/src/frontend/src/components/common/Navbar/index.tsx @@ -1,6 +1,6 @@ import Image from '@Components/RadixComponents/Image'; import { NavLink } from 'react-router-dom'; -import dtmLogo from '@Assets/images/dtm-logo.svg'; +import dtmLogo from '@Assets/images/LandingPage/DTM-logo-red.svg'; import { navLinks } from '@Constants/index'; import UserProfile from '../UserProfile'; import { FlexRow } from '../Layouts'; @@ -10,7 +10,11 @@ export default function Navbar() { return (