From 1b35c937c1be40626ca14e2c30c46fb37d016628 Mon Sep 17 00:00:00 2001 From: tsuki Date: Mon, 28 Jul 2025 23:14:43 +0800 Subject: [PATCH] sync me --- app/me/account/page.tsx | 128 +++++++++++++++++++++++++++++ app/me/notifications/page.tsx | 101 +++++++++++++++++++++++ app/me/profile/page.tsx | 149 ++++++++++++++++++++++++++++++++++ app/me/security/page.tsx | 125 ++++++++++++++++++++++++++++ components/ui/popover.tsx | 48 +++++++++++ components/ui/textarea.tsx | 18 ++++ package-lock.json | 64 ++++++++++++++- package.json | 1 + 8 files changed, 631 insertions(+), 3 deletions(-) create mode 100644 app/me/account/page.tsx create mode 100644 app/me/notifications/page.tsx create mode 100644 app/me/profile/page.tsx create mode 100644 app/me/security/page.tsx create mode 100644 components/ui/popover.tsx create mode 100644 components/ui/textarea.tsx diff --git a/app/me/account/page.tsx b/app/me/account/page.tsx new file mode 100644 index 0000000..765d1d8 --- /dev/null +++ b/app/me/account/page.tsx @@ -0,0 +1,128 @@ +"use client" + +import { useState } from "react" +import { Button } from "@/components/ui/button" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" +import { Separator } from "@/components/ui/separator" +import { Eye, EyeOff, Save } from "lucide-react" + +export default function Page() { + const [showPassword, setShowPassword] = useState(false) + + return ( +
+
+

账户设置

+

管理您的账户基本设置和安全信息

+
+ + + + 账户信息 + 管理您的账户基本设置 + + +
+
+
+ +

zhangsan2024

+
+ +
+ + + +
+
+ +

zhangsan@example.com

+
+ +
+ + + +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+
+ + +
+
+ + + + 语言和地区 + 设置您的语言偏好和时区 + + +
+ + +
+ +
+ + +
+ + +
+
+
+ ) +} diff --git a/app/me/notifications/page.tsx b/app/me/notifications/page.tsx new file mode 100644 index 0000000..942c3a0 --- /dev/null +++ b/app/me/notifications/page.tsx @@ -0,0 +1,101 @@ +"use client" + +import { useState } from "react" +import { Button } from "@/components/ui/button" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { Label } from "@/components/ui/label" +import { Switch } from "@/components/ui/switch" +import { Separator } from "@/components/ui/separator" +import { Mail, Bell, Phone, Save } from "lucide-react" + +export default function Page() { + const [notifications, setNotifications] = useState({ + email: true, + push: false, + sms: true, + marketing: false, + }) + + return ( +
+
+

通知设置

+

选择您希望接收的通知类型和频率

+
+ + + + 通知偏好 + 选择您希望接收的通知类型 + + +
+
+
+ +

接收重要更新和活动通知

+
+ setNotifications({ ...notifications, email: checked })} + /> +
+ + + +
+
+ +

在浏览器中接收实时通知

+
+ setNotifications({ ...notifications, push: checked })} + /> +
+ + + +
+
+ +

接收安全相关的短信提醒

+
+ setNotifications({ ...notifications, sms: checked })} + /> +
+ + + +
+
+ +

接收产品更新和促销信息

+
+ setNotifications({ ...notifications, marketing: checked })} + /> +
+
+ + +
+
+
+ ) +} diff --git a/app/me/profile/page.tsx b/app/me/profile/page.tsx new file mode 100644 index 0000000..391a0c0 --- /dev/null +++ b/app/me/profile/page.tsx @@ -0,0 +1,149 @@ +"use client" + +import { useState } from "react" +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" +import { Button } from "@/components/ui/button" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" +import { Textarea } from "@/components/ui/textarea" +import { Badge } from "@/components/ui/badge" +import { Calendar } from "@/components/ui/calendar" +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover" +import { Camera, CalendarIcon, Save } from "lucide-react" +import { cn } from "@/lib/utils" +import { format } from "date-fns" + +export default function Page() { + const [date, setDate] = useState() + const [profileData, setProfileData] = useState({ + name: "张三", + email: "zhangsan@example.com", + phone: "+86 138 0013 8000", + bio: "这是我的个人简介,我是一名前端开发工程师,热爱技术和创新。", + location: "北京市朝阳区", + website: "https://zhangsan.dev", + company: "科技有限公司", + }) + + return ( +
+
+

个人资料

+

管理您的个人信息和公开资料

+
+ + + + 基本信息 + 更新您的个人资料信息 + + +
+ + + 张三 + +
+ +

推荐尺寸:400x400px,支持 JPG、PNG 格式

+
+
+ +
+
+ + setProfileData({ ...profileData, name: e.target.value })} + /> +
+
+ +
+ setProfileData({ ...profileData, email: e.target.value })} + /> + 已验证 +
+
+
+ + setProfileData({ ...profileData, phone: e.target.value })} + /> +
+
+ + setProfileData({ ...profileData, company: e.target.value })} + /> +
+
+ + setProfileData({ ...profileData, location: e.target.value })} + /> +
+
+ + setProfileData({ ...profileData, website: e.target.value })} + /> +
+
+ +
+ +