feat: settings, wallet, notifications, and identity verification pages

This commit is contained in:
zetaloop
2026-02-20 15:34:15 +08:00
parent 6523556d8b
commit 5b21793ede
4 changed files with 464 additions and 9 deletions
+118 -2
View File
@@ -1,8 +1,124 @@
"use client"
import { Camera } from "lucide-react"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
import { Separator } from "@/components/ui/separator"
import { Switch } from "@/components/ui/switch"
import { Textarea } from "@/components/ui/textarea"
import { currentUser } from "@/lib/mock-data"
import { useAuthStore } from "@/store/auth"
export default function SettingsPage() {
const { currentRole, switchRole } = useAuthStore()
return (
<div>
<div className="max-w-2xl space-y-6">
<h1 className="text-2xl font-bold"></h1>
<p className="mt-2 text-muted-foreground"></p>
<Card>
<CardHeader>
<CardTitle className="text-base"></CardTitle>
</CardHeader>
<CardContent className="flex items-center gap-4">
<div className="relative">
<Avatar className="h-20 w-20">
<AvatarImage src={currentUser.avatar} />
<AvatarFallback className="text-lg">{currentUser.nickname[0]}</AvatarFallback>
</Avatar>
<button
type="button"
className="absolute bottom-0 right-0 h-7 w-7 rounded-full bg-primary text-primary-foreground flex items-center justify-center"
>
<Camera className="h-3.5 w-3.5" />
</button>
</div>
<p className="text-sm text-muted-foreground"> JPGPNG </p>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="text-base"></CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<div className="space-y-2">
<Label htmlFor="nickname"></Label>
<Input id="nickname" defaultValue={currentUser.nickname} />
</div>
<div className="space-y-2">
<Label htmlFor="bio"></Label>
<Textarea id="bio" defaultValue={currentUser.bio} rows={3} />
</div>
<div className="space-y-2">
<Label htmlFor="phone"></Label>
<Input id="phone" defaultValue={currentUser.phone} disabled />
<p className="text-xs text-muted-foreground"></p>
</div>
<Button></Button>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="text-base"></CardTitle>
</CardHeader>
<CardContent className="space-y-3">
<p className="text-sm text-muted-foreground"></p>
<RadioGroup
value={currentRole}
onValueChange={(v) => switchRole(v as "consumer" | "player" | "owner")}
>
<div className="flex items-center space-x-2">
<RadioGroupItem value="consumer" id="role-consumer" />
<Label htmlFor="role-consumer"></Label>
</div>
<div className="flex items-center space-x-2">
<RadioGroupItem value="player" id="role-player" />
<Label htmlFor="role-player"></Label>
</div>
<div className="flex items-center space-x-2">
<RadioGroupItem value="owner" id="role-owner" />
<Label htmlFor="role-owner"></Label>
</div>
</RadioGroup>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="text-base"></CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium"></p>
<p className="text-xs text-muted-foreground"></p>
</div>
<Switch defaultChecked />
</div>
<Separator />
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium"></p>
<p className="text-xs text-muted-foreground"></p>
</div>
<Switch defaultChecked />
</div>
<Separator />
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium"></p>
<p className="text-xs text-muted-foreground"></p>
</div>
<Switch />
</div>
</CardContent>
</Card>
</div>
)
}