Skip to content

Commit 4ce667c

Browse files
committed
feat: add privacy policy and user agreement pages
1 parent 6343c3a commit 4ce667c

4 files changed

Lines changed: 379 additions & 5 deletions

File tree

frontend/src/App.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import PublicTaskPage from "./pages/public-task"
2727
import PostCreatePage from "./pages/post-create"
2828
import ProjectOverviewPage from "./pages/console/user/project/overview"
2929
import TaskDetailPage from "./pages/console/user/task/task-detail"
30+
import PrivacyPolicyPage from "./pages/privacy-policy"
31+
import UserAgreementPage from "./pages/user-agreement"
3032

3133
function TaskDetailRoute() {
3234
const { taskId } = useParams()
@@ -43,6 +45,8 @@ function App() {
4345
<Route path="/playground" element={<PlaygroundPage />} />
4446
<Route path="/playground/create" element={<PostCreatePage />} />
4547
<Route path="/playground/detail" element={<PlaygroundDetailPage />} />
48+
<Route path="/privacy-policy" element={<PrivacyPolicyPage />} />
49+
<Route path="/user-agreement" element={<UserAgreementPage />} />
4650
<Route path="/tasks/public" element={<PublicTaskPage />} />
4751
<Route path="/login" element={<LoginPage />} />
4852
<Route path="/findpassword" element={<FindPasswordPage />} />
@@ -77,4 +81,4 @@ function App() {
7781
)
7882
}
7983

80-
export default App
84+
export default App

frontend/src/components/welcome/footer.tsx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
import { Link } from "react-router-dom"
3+
24
const LINKS = [
35
{
46
title: "资源",
@@ -32,6 +34,14 @@ const LINKS = [
3234
title: "长亭百智云",
3335
href: "https://www.baizhi.cloud/"
3436
},
37+
{
38+
title: "隐私政策",
39+
href: "/privacy-policy"
40+
},
41+
{
42+
title: "用户协议",
43+
href: "/user-agreement"
44+
},
3545
{
3646
title: "京ICP备2024055124号-12",
3747
href: "https://beian.miit.gov.cn/"
@@ -59,9 +69,15 @@ const Footer = () => {
5969
<ul className="text-background/50 text-sm flex flex-col gap-2">
6070
{link.links.map((link) => (
6171
<li key={link.title}>
62-
<a href={link.href} target="_blank" className="flex items-center gap-2 hover:text-background">
63-
{link.title}
64-
</a>
72+
{link.href.startsWith("/") ? (
73+
<Link to={link.href} className="flex items-center gap-2 hover:text-background">
74+
{link.title}
75+
</Link>
76+
) : (
77+
<a href={link.href} target="_blank" rel="noreferrer" className="flex items-center gap-2 hover:text-background">
78+
{link.title}
79+
</a>
80+
)}
6581
</li>
6682
))}
6783
</ul>
@@ -89,4 +105,4 @@ const Footer = () => {
89105
)
90106
};
91107

92-
export default Footer;
108+
export default Footer;
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
import { AuthProvider } from "@/components/auth-provider"
2+
import Footer from "@/components/welcome/footer"
3+
import Header from "@/components/welcome/header"
4+
5+
const sections = [
6+
{
7+
id: "collection",
8+
title: "我们可能收集的信息",
9+
content: [
10+
"为提供账号注册、登录认证、任务协作、项目管理、支付结算、消息通知和客户支持等服务,我们可能收集与您相关的必要信息。",
11+
],
12+
items: [
13+
"账号信息:如昵称、邮箱地址、头像、团队归属、登录状态等。",
14+
"身份认证信息:如密码摘要、绑定的第三方身份信息、验证码校验结果等。",
15+
"使用信息:如访问时间、操作日志、设备信息、浏览器信息、IP 地址、错误日志等。",
16+
"业务数据:如项目、任务、仓库连接信息、模型选择、配置项以及您主动提交的内容。",
17+
"客服与反馈信息:如您在工单、邮件、社群或反馈表单中提交的信息。",
18+
],
19+
},
20+
{
21+
id: "usage",
22+
title: "我们如何使用这些信息",
23+
items: [
24+
"用于创建、维护和验证您的平台账号与团队身份。",
25+
"用于提供 AI 开发、任务执行、协作管理、通知提醒等核心功能。",
26+
"用于保障服务稳定性与安全性,包括风险识别、故障排查、审计追踪和异常处理。",
27+
"用于改进产品体验,如统计分析、性能优化、功能迭代与服务质量提升。",
28+
"在符合法律法规要求的前提下,用于履行合规义务或回应监管要求。",
29+
],
30+
note: "我们仅在实现上述目的所必需的范围内处理个人信息,并尽量采用去标识化、权限隔离和最小化访问策略来降低风险。",
31+
},
32+
{
33+
id: "sharing",
34+
title: "信息共享、转让与公开披露",
35+
content: [
36+
"除法律法规另有规定,或为实现服务所必需外,我们不会向无关第三方出售您的个人信息。",
37+
],
38+
items: [
39+
"经您授权或主动选择后,与第三方平台或服务提供方进行必要的数据交互。",
40+
"为完成支付、邮件发送、云资源调度、身份认证等基础能力,由受托服务商提供支持。",
41+
"在法律法规、司法机关或监管机构依法要求下进行披露。",
42+
],
43+
},
44+
{
45+
id: "storage",
46+
title: "信息存储与安全保护",
47+
items: [
48+
"我们会采取访问控制、传输加密、日志审计、备份恢复等合理安全措施保护数据。",
49+
"您的信息会在实现业务目的所需的最短期限内保存,超期后将按规则删除或匿名化处理。",
50+
"如发生安全事件,我们会根据法律法规要求及时评估影响并采取补救措施。",
51+
],
52+
},
53+
{
54+
id: "rights",
55+
title: "您享有的权利",
56+
content: ["在法律法规允许的范围内,您可以通过平台功能或联系我们行使以下权利:"],
57+
items: [
58+
"查询、访问和更正您的账号资料。",
59+
"绑定、修改或删除部分账号信息与身份信息。",
60+
"注销账号,或在符合法律规定的情况下申请删除相关个人信息。",
61+
"对我们的信息处理规则提出意见、解释请求或投诉建议。",
62+
],
63+
},
64+
{
65+
id: "cookies",
66+
title: "Cookies、会话与日志信息",
67+
content: [
68+
"为维持登录状态、提升访问效率并分析服务运行情况,我们可能使用 Cookies、本地存储、会话标识符以及服务日志。您可通过浏览器设置进行控制,但部分功能可能因此无法正常使用。",
69+
],
70+
},
71+
{
72+
id: "children",
73+
title: "未成年人保护",
74+
content: [
75+
"本平台主要面向具备相应民事行为能力的用户和企业研发团队。若您为未成年人,请在监护人陪同下阅读并决定是否使用相关服务。",
76+
],
77+
},
78+
{
79+
id: "updates",
80+
title: "政策更新",
81+
content: [
82+
"我们可能根据业务变化、产品升级或法律法规要求适时修订本隐私政策。更新后的版本会发布在本页面,并自发布之日起生效。若变更涉及您的重大权益,我们会通过合理方式向您提示。",
83+
],
84+
},
85+
{
86+
id: "contact",
87+
title: "联系我们",
88+
content: [
89+
"如您对本隐私政策或个人信息处理事项有任何疑问、意见或投诉建议,可通过官方渠道与我们联系。",
90+
],
91+
},
92+
]
93+
94+
export default function PrivacyPolicyPage() {
95+
return (
96+
<AuthProvider>
97+
<div className="min-h-screen bg-[radial-gradient(circle_at_top_left,rgba(27,92,255,0.18),transparent_34%),radial-gradient(circle_at_top_right,rgba(4,203,156,0.16),transparent_26%),linear-gradient(180deg,#eef4ff_0%,#f7f9fc_45%,#eef2f7_100%)]">
98+
<Header />
99+
<main className="mx-auto flex w-full max-w-[1120px] flex-col gap-6 px-4 pt-24 pb-12 sm:px-6 lg:px-8">
100+
<section className="overflow-hidden rounded-[32px] border border-white/35 bg-[linear-gradient(135deg,rgba(10,31,67,0.96),rgba(27,92,255,0.92))] p-8 text-white shadow-[0_24px_80px_rgba(21,42,84,0.14)] sm:p-10">
101+
<div className="inline-flex items-center gap-3 rounded-full border border-white/20 bg-white/10 px-4 py-2 text-sm">
102+
<img src="/logo.png" alt="MonkeyCode Logo" className="size-6" />
103+
<span>MonkeyCode 智能开发平台</span>
104+
</div>
105+
<h1 className="mt-6 text-4xl font-bold leading-tight sm:text-5xl">隐私政策</h1>
106+
<p className="mt-4 max-w-3xl text-sm leading-7 text-white/80 sm:text-[15px]">
107+
我们重视您的个人信息与数据安全。本页面用于说明 MonkeyCode 智能开发平台在提供产品与服务过程中,如何收集、使用、存储、共享和保护与您相关的信息,以及您可以如何管理这些信息。
108+
</p>
109+
<div className="mt-6 flex flex-wrap gap-3 text-xs text-white/85 sm:text-sm">
110+
<span className="rounded-full bg-white/10 px-4 py-2">适用于官网与控制台服务</span>
111+
<span className="rounded-full bg-white/10 px-4 py-2">最近更新:2026-03-24</span>
112+
<span className="rounded-full bg-white/10 px-4 py-2">建议定期查看更新内容</span>
113+
</div>
114+
</section>
115+
116+
<section className="grid gap-6 lg:grid-cols-[280px_minmax(0,1fr)]">
117+
<aside className="h-fit rounded-[28px] border border-slate-900/10 bg-white/85 p-6 shadow-[0_24px_80px_rgba(21,42,84,0.14)] backdrop-blur lg:sticky lg:top-6">
118+
<h2 className="text-lg font-semibold text-slate-900">目录</h2>
119+
<nav className="mt-4 flex flex-col gap-1 text-sm">
120+
{sections.map((section, index) => (
121+
<a
122+
key={section.id}
123+
href={`#${section.id}`}
124+
className="rounded-xl px-3 py-2 text-slate-500 transition hover:bg-blue-50 hover:text-blue-600"
125+
>
126+
{index + 1}. {section.title}
127+
</a>
128+
))}
129+
</nav>
130+
</aside>
131+
132+
<article className="rounded-[28px] border border-slate-900/10 bg-white/85 p-7 shadow-[0_24px_80px_rgba(21,42,84,0.14)] backdrop-blur sm:p-8">
133+
{sections.map((section, index) => (
134+
<section
135+
id={section.id}
136+
key={section.id}
137+
className={index === 0 ? "" : "mt-8 border-t border-slate-900/10 pt-8"}
138+
>
139+
<span className="inline-flex rounded-full bg-blue-50 px-3 py-1 text-xs font-bold tracking-[0.04em] text-blue-600">
140+
Section {index + 1}
141+
</span>
142+
<h2 className="mt-4 text-2xl font-semibold text-slate-900">{section.title}</h2>
143+
{section.content?.map((paragraph) => (
144+
<p key={paragraph} className="mt-3 text-[15px] leading-7 text-slate-500">
145+
{paragraph}
146+
</p>
147+
))}
148+
{section.items ? (
149+
<ul className="mt-4 list-disc space-y-2 pl-5 text-[15px] leading-7 text-slate-500">
150+
{section.items.map((item) => (
151+
<li key={item}>{item}</li>
152+
))}
153+
</ul>
154+
) : null}
155+
{section.note ? (
156+
<div className="mt-5 rounded-2xl border border-blue-100 bg-gradient-to-b from-white to-slate-50 px-5 py-4 text-[15px] leading-7 text-slate-500">
157+
{section.note}
158+
</div>
159+
) : null}
160+
{section.id === "contact" ? (
161+
<p className="mt-4 text-[15px] leading-7 text-slate-500">
162+
官方渠道:
163+
<a className="text-blue-600 hover:underline" href="https://www.chaitin.cn/" target="_blank" rel="noreferrer">
164+
长亭科技官网
165+
</a>
166+
{' '}{' '}
167+
<a className="text-blue-600 hover:underline" href="https://www.baizhi.cloud/" target="_blank" rel="noreferrer">
168+
长亭百智云官网
169+
</a>
170+
171+
</p>
172+
) : null}
173+
</section>
174+
))}
175+
</article>
176+
</section>
177+
</main>
178+
<Footer />
179+
</div>
180+
</AuthProvider>
181+
)
182+
}

0 commit comments

Comments
 (0)