From 7e70e4fc84bce3c12a5bf2c6c98370335d3302ff Mon Sep 17 00:00:00 2001 From: Mamadou DICKO <63923024+mamadoudicko@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:48:41 +0200 Subject: [PATCH] feat: add new signin/login page (#1492) Issue https://github.com/StanGirard/quivr/issues/1404 https://github.com/StanGirard/quivr/assets/63923024/703fedf3-2f39-407b-afc2-78318829ca0f --- .../app/(auth)/login/__tests__/page.test.tsx | 8 +- .../login/components/GoogleLogin/index.tsx | 4 +- .../MagicLinkLogin/hooks/useMagicLinkLogin.ts | 11 +- .../login/components/MagicLinkLogin/index.tsx | 4 +- .../hooks/__tests__/usePassword.test.ts | 50 ------- .../hooks/usePasswordForgotten.ts | 59 -------- .../components/PasswordForgotten/index.tsx | 33 ----- .../login/hooks/__tests__/useLogin.test.ts | 38 ----- frontend/app/(auth)/login/hooks/useLogin.ts | 48 +------ frontend/app/(auth)/login/page.tsx | 77 ++++------ .../recover-password/__tests__/page.test.tsx | 131 ------------------ frontend/app/(auth)/recover-password/page.tsx | 91 ------------ .../app/(auth)/signup/__tests__/page.test.tsx | 66 --------- frontend/app/(auth)/signup/hooks/useSignUp.ts | 50 ------- frontend/app/(auth)/signup/page.tsx | 64 --------- .../components/HomeHeader/HomeHeader.tsx | 2 +- .../components/PopoverMenuMobile.tsx | 3 +- .../HomeHeader/hooks/useHomeHeader.tsx | 2 +- .../Sections/DemoSection/DemoSection.tsx | 6 +- .../components/Sections/FooterSection.tsx | 6 +- .../components/Sections/IntroSection.tsx | 6 +- .../SecuritySection/SecuritySection.tsx | 6 +- .../(home)/components/UseCases/UseCases.tsx | 6 +- .../components => lib/assets}/QuivrLogo.tsx | 0 frontend/lib/components/Footer/index.tsx | 8 +- .../NavItems/components/AuthButtons.tsx | 4 +- frontend/lib/components/NavBar/index.tsx | 3 +- frontend/lib/config/LocaleConfig/resources.ts | 26 ---- frontend/public/locales/en/login.json | 17 +-- frontend/public/locales/en/signUp.json | 13 -- frontend/public/locales/en/translation.json | 1 - .../public/locales/en/updatePassword.json | 5 - frontend/public/locales/es/login.json | 19 +-- frontend/public/locales/es/signUp.json | 13 -- frontend/public/locales/es/translation.json | 1 - .../public/locales/es/updatePassword.json | 5 - frontend/public/locales/fr/login.json | 19 +-- frontend/public/locales/fr/signUp.json | 13 -- frontend/public/locales/fr/translation.json | 1 - .../public/locales/fr/updatePassword.json | 5 - frontend/public/locales/pt-br/login.json | 19 +-- frontend/public/locales/pt-br/signUp.json | 13 -- .../public/locales/pt-br/translation.json | 1 - .../public/locales/pt-br/updatePassword.json | 5 - frontend/public/locales/ru/login.json | 21 +-- frontend/public/locales/ru/signUp.json | 13 -- frontend/public/locales/ru/translation.json | 1 - .../public/locales/ru/updatePassword.json | 5 - frontend/public/locales/zh-cn/login.json | 19 +-- frontend/public/locales/zh-cn/signUp.json | 13 -- .../public/locales/zh-cn/translation.json | 1 - .../public/locales/zh-cn/updatePassword.json | 5 - frontend/tailwind.config.js | 1 + 53 files changed, 109 insertions(+), 932 deletions(-) delete mode 100644 frontend/app/(auth)/login/components/PasswordForgotten/hooks/__tests__/usePassword.test.ts delete mode 100644 frontend/app/(auth)/login/components/PasswordForgotten/hooks/usePasswordForgotten.ts delete mode 100644 frontend/app/(auth)/login/components/PasswordForgotten/index.tsx delete mode 100644 frontend/app/(auth)/login/hooks/__tests__/useLogin.test.ts delete mode 100644 frontend/app/(auth)/recover-password/__tests__/page.test.tsx delete mode 100644 frontend/app/(auth)/recover-password/page.tsx delete mode 100644 frontend/app/(auth)/signup/__tests__/page.test.tsx delete mode 100644 frontend/app/(auth)/signup/hooks/useSignUp.ts delete mode 100644 frontend/app/(auth)/signup/page.tsx rename frontend/{app/(home)/components/HomeHeader/components => lib/assets}/QuivrLogo.tsx (100%) delete mode 100644 frontend/public/locales/en/signUp.json delete mode 100644 frontend/public/locales/en/updatePassword.json delete mode 100644 frontend/public/locales/es/signUp.json delete mode 100644 frontend/public/locales/es/updatePassword.json delete mode 100644 frontend/public/locales/fr/signUp.json delete mode 100644 frontend/public/locales/fr/updatePassword.json delete mode 100644 frontend/public/locales/pt-br/signUp.json delete mode 100644 frontend/public/locales/pt-br/updatePassword.json delete mode 100644 frontend/public/locales/ru/signUp.json delete mode 100644 frontend/public/locales/ru/updatePassword.json delete mode 100644 frontend/public/locales/zh-cn/signUp.json delete mode 100644 frontend/public/locales/zh-cn/updatePassword.json diff --git a/frontend/app/(auth)/login/__tests__/page.test.tsx b/frontend/app/(auth)/login/__tests__/page.test.tsx index 8723f301f..7b4d6a195 100644 --- a/frontend/app/(auth)/login/__tests__/page.test.tsx +++ b/frontend/app/(auth)/login/__tests__/page.test.tsx @@ -19,13 +19,17 @@ vi.mock("@/lib/context/SupabaseProvider", () => ({ useSupabase: () => mockUseSupabase(), })); +vi.mock("@/lib/assets/QuivrLogo", () => ({ + QuivrLogo: () =>