new change

This commit is contained in:
chenZB666
2025-10-09 23:42:41 +08:00
parent e1b73b82a2
commit b96533827e
6 changed files with 215 additions and 72 deletions

View File

@@ -1,9 +1,8 @@
'use client';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import AuthForm from '@/components/auth/AuthForm';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import Link from 'next/link';
import Image from 'next/image';
import { useSearchParams } from 'next/navigation';
@@ -65,52 +64,8 @@ export default function RegisterPage() {
<div className="w-16 h-1 bg-gradient-to-r from-emerald-500 to-teal-500 mx-auto mt-2 rounded-full"></div>
</CardHeader>
<CardContent className="space-y-6 px-6 pb-8">
<form action="/api/auth/signup" method="post">
<input type="hidden" name="callbackUrl" value={callbackUrl} />
<div className="space-y-2">
<Label htmlFor="username" className="text-gray-700 dark:text-gray-300"></Label>
<Input
id="username"
name="username"
type="text"
placeholder="请输入用户名"
required
className="border-emerald-200 dark:border-emerald-900/30 focus:border-emerald-500 dark:focus:border-emerald-400 transition-all rounded-xl"
/>
</div>
<div className="space-y-2">
<Label htmlFor="email" className="text-gray-700 dark:text-gray-300"></Label>
<Input
id="email"
name="email"
type="email"
placeholder="请输入您的邮箱"
required
className="border-emerald-200 dark:border-emerald-900/30 focus:border-emerald-500 dark:focus:border-emerald-400 transition-all rounded-xl"
/>
</div>
<div className="space-y-2">
<Label htmlFor="password" className="text-gray-700 dark:text-gray-300"></Label>
<Input
id="password"
name="password"
type="password"
placeholder="请输入密码"
required
className="border-emerald-200 dark:border-emerald-900/30 focus:border-emerald-500 dark:focus:border-emerald-400 transition-all rounded-xl"
/>
</div>
<Button
type="submit"
className="w-full mt-6 bg-emerald-600 hover:bg-emerald-700 text-white transition-all duration-300 transform hover:-translate-y-1 shadow-md hover:shadow-lg rounded-xl py-6"
>
</Button>
</form>
{/* 使用统一的认证表单组件 */}
<AuthForm type="register" />
{/* 分割线 */}
<div className="relative my-6">