This commit is contained in:
freedakgmail
2025-11-23 19:38:51 +08:00
parent e44dd0bd95
commit 3b0d8255f6
649 changed files with 656698 additions and 4133 deletions
+30 -46
View File
@@ -83,51 +83,36 @@ export default function NewTreePage() {
return (
<div className="min-h-screen bg-background flex flex-col">
<SiteHeader />
<main className="container mx-auto py-8 px-4 md:px-6 flex-1">
<main className="container mx-auto py-12 px-4 md:px-6 flex-1">
<div className="max-w-2xl mx-auto">
<div className="mb-6">
<Button
variant="ghost"
size="sm"
asChild
className="mb-4"
>
<Link href="/">
<ArrowLeft className="h-4 w-4 mr-2" />
</Link>
</Button>
<h1 className="text-3xl font-serif font-bold mb-2"></h1>
<p className="text-muted-foreground">
<div className="mb-8 text-center">
<h1 className="text-4xl font-serif font-light mb-3 tracking-wide"></h1>
<p className="text-muted-foreground font-light">
</p>
</div>
<Card>
<Card className="border-none shadow-sm bg-card/50 backdrop-blur">
<form onSubmit={handleSubmit}>
<CardHeader>
<div className="flex items-center gap-3">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-primary text-primary-foreground">
<TreePine className="h-6 w-6" />
</div>
<div>
<CardTitle></CardTitle>
<CardDescription>
</CardDescription>
</div>
<CardHeader className="text-center pb-8">
<div className="inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4 mx-auto">
<TreePine className="h-8 w-8" strokeWidth={1.5} />
</div>
<CardTitle className="text-2xl font-serif font-light"></CardTitle>
<CardDescription className="font-light">
</CardDescription>
</CardHeader>
<CardContent className="space-y-6">
<CardContent className="space-y-8 px-8">
{error && (
<Alert variant="destructive">
<AlertDescription>{error}</AlertDescription>
</Alert>
)}
<div className="space-y-2">
<Label htmlFor="name">
<div className="space-y-3">
<Label htmlFor="name" className="text-base font-normal">
<span className="text-destructive">*</span>
</Label>
<Input
@@ -137,14 +122,15 @@ export default function NewTreePage() {
onChange={(e) => setName(e.target.value)}
maxLength={50}
required
className="h-12"
/>
<p className="text-xs text-muted-foreground">
<p className="text-xs text-muted-foreground font-light">
使+/
</p>
</div>
<div className="space-y-2">
<Label htmlFor="description"></Label>
<div className="space-y-3">
<Label htmlFor="description" className="text-base font-normal"></Label>
<Textarea
id="description"
placeholder="简要描述您的家族历史、祖籍地等信息"
@@ -152,36 +138,34 @@ export default function NewTreePage() {
onChange={(e) => setDescription(e.target.value)}
rows={4}
maxLength={500}
className="resize-none"
/>
<p className="text-xs text-muted-foreground">
<p className="text-xs text-muted-foreground font-light">
{description.length}/500
</p>
</div>
<div className="rounded-lg border bg-muted/50 p-4">
<h3 className="font-medium mb-2">💡 </h3>
<ul className="text-sm text-muted-foreground space-y-1">
<li> </li>
<li> </li>
<li> </li>
</ul>
<div className="rounded-lg bg-muted/30 p-6 space-y-2">
<p className="text-sm text-muted-foreground font-light leading-relaxed">
</p>
</div>
</CardContent>
<CardFooter className="flex gap-3">
<CardFooter className="flex gap-4 px-8 pt-8 pb-8">
<Button
type="button"
variant="outline"
onClick={() => router.back()}
disabled={loading}
className="flex-1"
className="flex-1 h-12"
>
</Button>
<Button
type="submit"
disabled={loading || !name.trim()}
className="flex-1"
className="flex-1 h-12 bg-primary text-primary-foreground hover:bg-primary/90"
>
{loading ? "创建中..." : "创建家族树"}
</Button>