From 527efcd154f10a447a79e5063c83c2b824907230 Mon Sep 17 00:00:00 2001 From: Chak <444chak@gmail.com> Date: Thu, 19 Dec 2024 14:31:42 +0100 Subject: [PATCH 01/12] =?UTF-8?q?=E2=9C=A8feature:=20Refactor=20le=20compo?= =?UTF-8?q?sant=20Header=20pour=20am=C3=A9liorer=20la=20gestion=20des=20?= =?UTF-8?q?=C3=A9tats=20et=20optimiser=20le=20rendu=20SVG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front-js/src/components/Header/Header.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/front-js/src/components/Header/Header.tsx b/front-js/src/components/Header/Header.tsx index 1b4c561..115082f 100644 --- a/front-js/src/components/Header/Header.tsx +++ b/front-js/src/components/Header/Header.tsx @@ -69,11 +69,7 @@ const Header: React.FC = ({ onClick={onClickLogout} > - From 78f8b1aff6e1595f42f551fb6af985b4fe32b5a1 Mon Sep 17 00:00:00 2001 From: Chak <444chak@gmail.com> Date: Thu, 19 Dec 2024 15:26:09 +0100 Subject: [PATCH 02/12] =?UTF-8?q?=E2=9C=A8feature:=20Ajouter=20le=20compos?= =?UTF-8?q?ant=20Backlink=20avec=20animations=20SVG=20et=20styles=20SCSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Backlink/Backlink.scss | 28 +++++++++++++++ front-js/src/components/Backlink/Backlink.tsx | 36 +++++++++++++++++++ front-js/src/components/Backlink/index.ts | 1 + 3 files changed, 65 insertions(+) create mode 100644 front-js/src/components/Backlink/Backlink.scss create mode 100644 front-js/src/components/Backlink/Backlink.tsx create mode 100644 front-js/src/components/Backlink/index.ts diff --git a/front-js/src/components/Backlink/Backlink.scss b/front-js/src/components/Backlink/Backlink.scss new file mode 100644 index 0000000..e440f4b --- /dev/null +++ b/front-js/src/components/Backlink/Backlink.scss @@ -0,0 +1,28 @@ +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} + +@keyframes rotate-back { + 0% { + transform: rotate(360deg); + } + 100% { + transform: rotate(0); + } +} + +.backlink { + display: flex; + cursor: pointer; + > svg { + animation: rotate-back 0.7s ease 1; + &:hover { + animation: rotate 0.7s ease 1; + } + } +} diff --git a/front-js/src/components/Backlink/Backlink.tsx b/front-js/src/components/Backlink/Backlink.tsx new file mode 100644 index 0000000..d147326 --- /dev/null +++ b/front-js/src/components/Backlink/Backlink.tsx @@ -0,0 +1,36 @@ +/* + Backlink component +*/ +"use client"; + +import React from "react"; +import "./Backlink.scss"; +import Box from "../Box"; + +interface BacklinkProps { + onClick: () => void; +} + +const Backlink: React.FC = ({ onClick }) => { + return ( + +
+ + + +
+
+ ); +}; + +export default Backlink; diff --git a/front-js/src/components/Backlink/index.ts b/front-js/src/components/Backlink/index.ts new file mode 100644 index 0000000..46b06cb --- /dev/null +++ b/front-js/src/components/Backlink/index.ts @@ -0,0 +1 @@ +export { default } from "./Backlink"; From 80a45dc184ae83a28c82978b5bb6f48765a97137 Mon Sep 17 00:00:00 2001 From: Chak <444chak@gmail.com> Date: Thu, 19 Dec 2024 15:26:17 +0100 Subject: [PATCH 03/12] =?UTF-8?q?=E2=9C=A8style:=20Ajouter=20une=20bordure?= =?UTF-8?q?=20au=20composant=20Input=20pour=20am=C3=A9liorer=20l'esth?= =?UTF-8?q?=C3=A9tique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front-js/src/components/Input/Input.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/front-js/src/components/Input/Input.scss b/front-js/src/components/Input/Input.scss index 8453344..9cc3685 100644 --- a/front-js/src/components/Input/Input.scss +++ b/front-js/src/components/Input/Input.scss @@ -18,6 +18,7 @@ border-radius: 10px; padding: 8px; transition: all 0.3s; + border: 1px solid var(--Bleu, #5f64fe0f); &:hover { background-color: var(--Gris-Fonce, #d3d3d3); } From d67acaa4c7e65e6f14897811f86c553951a640a8 Mon Sep 17 00:00:00 2001 From: Chak <444chak@gmail.com> Date: Thu, 19 Dec 2024 15:26:35 +0100 Subject: [PATCH 04/12] =?UTF-8?q?=E2=9C=A8feature:=20Ajouter=20le=20compos?= =?UTF-8?q?ant=20Backlink=20=C3=A0=20la=20page=20de=20connexion=20pour=20a?= =?UTF-8?q?m=C3=A9liorer=20la=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front-js/src/app/auth/login/page.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/front-js/src/app/auth/login/page.tsx b/front-js/src/app/auth/login/page.tsx index 9873d29..5932869 100644 --- a/front-js/src/app/auth/login/page.tsx +++ b/front-js/src/app/auth/login/page.tsx @@ -13,8 +13,12 @@ import axios from "@/axiosConfig"; import Cookies from "js-cookie"; import { AxiosError } from "axios"; import { Alert, CircularProgress } from "@mui/material"; +import Backlink from "@/components/Backlink"; +import { useRouter } from "next/navigation"; export default function Home() { + const router = useRouter(); + const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); @@ -53,6 +57,7 @@ export default function Home() { return ( + Networkers From c375529a69ea156d286f5f7af232144582d3fccc Mon Sep 17 00:00:00 2001 From: Chak <444chak@gmail.com> Date: Thu, 19 Dec 2024 15:26:41 +0100 Subject: [PATCH 05/12] =?UTF-8?q?=E2=9C=A8feature:=20Ajouter=20le=20compos?= =?UTF-8?q?ant=20Backlink=20=C3=A0=20la=20page=20d'inscription=20pour=20am?= =?UTF-8?q?=C3=A9liorer=20la=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front-js/src/app/auth/signup/page.tsx | 131 +++++++++++++------------- 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/front-js/src/app/auth/signup/page.tsx b/front-js/src/app/auth/signup/page.tsx index 468a477..29ddeb3 100644 --- a/front-js/src/app/auth/signup/page.tsx +++ b/front-js/src/app/auth/signup/page.tsx @@ -7,75 +7,78 @@ import Layout from "@/components/Layout"; import Modal from "@/components/Modal"; import Title from "@/components/Title"; import Text from "@/components/Text"; -import { use, useState } from "react"; +import { useState } from "react"; import Link from "@/components/Link"; -import Space from "@/components/Space"; import ValidatePsw from "@/components/ValidatePsw"; -import {validate_passwd} from "./validatePasswd"; +import { validate_passwd } from "./validatePasswd"; +import Backlink from "@/components/Backlink"; +import { useRouter } from "next/navigation"; export default function Home() { - const [username, setUsername] = useState(""); + const router = useRouter(); + const [username, setUsername] = useState(""); - const [password, setPassword] = useState(""); + const [password, setPassword] = useState(""); - const [confirmPassword, setConfirmPassword] = useState("") + const [confirmPassword, setConfirmPassword] = useState(""); - const isValid = false; - - return ( - - - Networkers - - - - Inscription - setUsername(e.target.value)} - required - label="Nom d'utilisateur" - /> - setPassword(e.target.value)} - required - label="Mot de passe" - /> - setConfirmPassword(e.target.value)} - required - label="Confimer mot de passe" - /> - -