misc: removed useless stuff, forms & update deps

This commit is contained in:
Théo 2023-07-26 11:37:11 +02:00
parent 021a3aa154
commit fa7e993265
5 changed files with 1013 additions and 970 deletions

View file

@ -78,9 +78,6 @@
} }
@layer components { @layer components {
.console {
@apply relative top-0.5 inline-block;
}
input:-webkit-autofill, input:-webkit-autofill,
input:-webkit-autofill:hover, input:-webkit-autofill:hover,
input:-webkit-autofill:focus, input:-webkit-autofill:focus,

View file

@ -1,38 +0,0 @@
'use client';
import { cn } from '@/lib/utils';
import { useEffect, useState } from 'react';
export default function Console({ text, className }: { text: string; className?: string }) {
const [message, setMessage] = useState('');
const [typingIndex, setTypingIndex] = useState(0);
const typingDelay = 200; // The delay between each character being typed, in milliseconds
useEffect(() => {
const intervalId = setInterval(() => {
setTypingIndex((prevIndex) => prevIndex + 1);
}, typingDelay);
return () => clearInterval(intervalId);
}, [text]);
useEffect(() => {
if (typingIndex <= text.length) {
setMessage(text.slice(0, typingIndex));
}
}, [typingIndex, text]);
return (
<div className="inline-block h-4">
<span className={cn('text-4xl', className)}>{message}</span>
<div
className={cn('relative top-0.5 inline-block', {
hidden: typingIndex % 2 === 0
})}
>
&#95;
</div>
</div>
);
}

View file

@ -25,7 +25,11 @@ const AuthFormSchema = z.object({
email: z.string().optional(), email: z.string().optional(),
passwd: z.string().nonempty({ message: 'Mot de passe requis' }), passwd: z.string().nonempty({ message: 'Mot de passe requis' }),
firstname: z.string().optional(), firstname: z.string().optional(),
lastname: z.string().optional() lastname: z.string().optional(),
// Remove this soon cause not supported anymore
description: z.string().optional(),
sgroup: z.string().optional(),
avatar: z.string().optional()
}); });
export default function UserAuthForm() { export default function UserAuthForm() {
@ -36,7 +40,11 @@ export default function UserAuthForm() {
email: '', email: '',
passwd: '', passwd: '',
firstname: '', firstname: '',
lastname: '' lastname: '',
// Remove this soon cause not supported anymore
description: '',
sgroup: '',
avatar: ''
} }
}); });

View file

@ -32,10 +32,10 @@
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "^2.0.0", "clsx": "^2.0.0",
"edge-csrf": "^1.0.4", "edge-csrf": "^1.0.4",
"framer-motion": "^10.12.22", "framer-motion": "^10.13.1",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"lucide-react": "^0.261.0", "lucide-react": "^0.263.1",
"next": "13.4.10", "next": "13.4.12",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
@ -43,7 +43,7 @@
"react-markdown": "^8.0.7", "react-markdown": "^8.0.7",
"remark-breaks": "^3.0.3", "remark-breaks": "^3.0.3",
"remark-gfm": "^3.0.1", "remark-gfm": "^3.0.1",
"sharp": "^0.32.3", "sharp": "^0.32.4",
"swr": "^2.2.0", "swr": "^2.2.0",
"tailwind-merge": "^1.14.0", "tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.6", "tailwindcss-animate": "^1.0.6",
@ -52,17 +52,17 @@
"devDependencies": { "devDependencies": {
"@tailwindcss/forms": "^0.5.4", "@tailwindcss/forms": "^0.5.4",
"@types/js-cookie": "^3.0.3", "@types/js-cookie": "^3.0.3",
"@types/node": "20.4.2", "@types/node": "20.4.5",
"@types/react": "18.2.15", "@types/react": "18.2.16",
"@types/react-dom": "18.2.7", "@types/react-dom": "18.2.7",
"@typescript-eslint/eslint-plugin": "^6.1.0", "@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.1.0", "@typescript-eslint/parser": "^6.2.0",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"eslint": "8.45.0", "eslint": "8.45.0",
"eslint-config-next": "13.4.10", "eslint-config-next": "13.4.12",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^5.0.0", "eslint-plugin-prettier": "^5.0.0",
"postcss": "^8.4.26", "postcss": "^8.4.27",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"prettier-plugin-tailwindcss": "^0.4.1", "prettier-plugin-tailwindcss": "^0.4.1",
"tailwindcss": "^3.3.3", "tailwindcss": "^3.3.3",

1910
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff