Skip to content

Commit

Permalink
Merge pull request #14 from sartek430/dev
Browse files Browse the repository at this point in the history
added vite & bug fixe input password color
  • Loading branch information
sartek430 committed Oct 7, 2023
2 parents ffab4a7 + 66d717e commit 3d7ef11
Show file tree
Hide file tree
Showing 17 changed files with 7,898 additions and 4,879 deletions.
5 changes: 3 additions & 2 deletions frontend/public/index.html → 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" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -13,7 +13,7 @@
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="manifest" href="/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -38,5 +38,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
12,725 changes: 7,862 additions & 4,863 deletions frontend/package-lock.json

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@vitejs/plugin-react": "^4.1.0",
"eslint": "^8.7.0",
"framer-motion": "^10.12.18",
"prettier": "^2.5.1",
Expand All @@ -27,10 +28,9 @@
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"start": "vite",
"build": "vite build",
"test": "cypress open"
},
"eslintConfig": {
"extends": [
Expand All @@ -52,7 +52,10 @@
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.16.7",
"@vitejs/plugin-react-refresh": "^1.3.6",
"create-vite": "^4.4.1",
"cypress": "^12.16.0",
"gh-pages": "^6.0.0"
"gh-pages": "^6.0.0",
"vite": "^4.4.11"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 11 additions & 9 deletions frontend/src/pages/Signup.js → frontend/src/pages/Signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,17 @@ const Signup = () => {
type={showPassword ? "text" : "password"}
placeholder="Password"
onChange={handlePasswordChange}
// Affiche une bordure rouge si le mot de passe est faible et verte s'il est fort et blanc s'il est vide
{...(passwordStrengthScore <= 3 && password !== ""
? { focusBorderColor: "#B7133A", borderColor: "#B7133A" }
: passwordStrengthScore > 3
? { focusBorderColor: "green", borderColor: "green" }
: {
focusBorderColor: "gray.500",
borderColor: "gray.500",
})}
// Affiche une bordure rouge si le mot de passe est faible et verte s'il est fort
borderColor={
passwordStrengthScore <= 3 ? "red.500" : "green.500"
}
focusBorderColor={
passwordStrengthScore <= 3 ? "red.500" : "green.500"
}
_hover={{
borderColor:
passwordStrengthScore <= 3 ? "red.500" : "green.500",
}}
/>
{/* affiche un bouton qui affiche ou non le mot de passe */}
<InputRightElement width="auto" m="5px">
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
// depending on your application, base can also be "/"
base: "/freelanceHelper",
plugins: [react()],
server: {
// this ensures that the browser opens upon server start
open: true,
// this sets a default port to 3000
port: 3000,
},
});

0 comments on commit 3d7ef11

Please sign in to comment.