mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-27 23:19:40 +08:00
feat: unify legal pages and login agreement
This commit is contained in:
1 parent
2a67ea3396
commit
c6fee2e78b
7 files changed
+565
-452
No files matched your search
@@ -1,16 +1,11 @@
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useAuth } from "@/components/auth-provider";
|
||||
import { IconMenu2, IconPointFilled } from "@tabler/icons-react";
|
||||
import { IconArrowLeft, IconMenu2 } from "@tabler/icons-react";
|
||||
import React from "react";
|
||||
import { Link, useLocation } from "react-router-dom";
|
||||
import { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger } from "../ui/drawer";
|
||||
|
||||
const navItems = [
|
||||
{ label: "介绍", to: "/" },
|
||||
{ label: "广场", to: "/playground" },
|
||||
];
|
||||
|
||||
const docsLink = "https://monkeycode.docs.baizhi.cloud/";
|
||||
const githubLink = "https://github.com/chaitin/MonkeyCode";
|
||||
|
||||
@@ -19,9 +14,20 @@ const Header = () => {
|
||||
const [isScrolled, setIsScrolled] = React.useState(false);
|
||||
const location = useLocation();
|
||||
const isWelcomePage = location.pathname === "/";
|
||||
const isLegalPage = location.pathname === "/privacy-policy" || location.pathname === "/user-agreement";
|
||||
const isTerminalPage = isWelcomePage || isLegalPage;
|
||||
const isPixelPage = isWelcomePage;
|
||||
const inviterId = typeof window !== "undefined" ? localStorage.getItem('ic') || '' : '';
|
||||
const signUpLink = "/api/v1/users/login?redirect=&inviter_id=" + inviterId;
|
||||
const navItems = isLegalPage
|
||||
? [
|
||||
{ label: "隐私政策", to: "/privacy-policy" },
|
||||
{ label: "用户协议", to: "/user-agreement" },
|
||||
]
|
||||
: [
|
||||
{ label: "介绍", to: "/" },
|
||||
{ label: "广场", to: "/playground" },
|
||||
];
|
||||
const activeNav = navItems.find((item) =>
|
||||
item.to === "/" ? location.pathname === "/" : location.pathname.startsWith(item.to)
|
||||
)?.to;
|
||||
@@ -35,7 +41,7 @@ const Header = () => {
|
||||
return () => window.removeEventListener('scroll', handleScroll);
|
||||
}, []);
|
||||
|
||||
if (isWelcomePage) {
|
||||
if (isTerminalPage) {
|
||||
return (
|
||||
<header className="fixed inset-x-0 top-0 z-50 px-4 pt-4 sm:px-6">
|
||||
<div
|
||||
@@ -69,11 +75,19 @@ const Header = () => {
|
||||
</DrawerTitle>
|
||||
</DrawerHeader>
|
||||
<div className="space-y-5 px-4 py-5">
|
||||
<div className="flex items-center gap-2 text-[11px] uppercase tracking-[0.22em] text-[#7a8c80]">
|
||||
<IconPointFilled className="size-3 text-[#7cf29c]" />
|
||||
System Online
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
{isLegalPage ? (
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="h-11 justify-start rounded-xl border border-[#1d2a22] px-4 text-sm text-[#a9b7ae] hover:bg-[#162019] hover:text-[#e8efe9]"
|
||||
asChild
|
||||
>
|
||||
<Link to="/">
|
||||
<IconArrowLeft className="size-4" />
|
||||
返回首页
|
||||
</Link>
|
||||
</Button>
|
||||
) : null}
|
||||
{navItems.map((item) => (
|
||||
<Button
|
||||
key={item.to}
|
||||
@@ -92,9 +106,11 @@ const Header = () => {
|
||||
<Button variant="ghost" className="h-11 justify-start rounded-xl border border-[#1d2a22] px-4 text-sm text-[#a9b7ae] hover:bg-[#162019] hover:text-[#e8efe9]" asChild>
|
||||
<a href={docsLink} target="_blank" rel="noreferrer">文档</a>
|
||||
</Button>
|
||||
<Button variant="ghost" className="h-11 justify-start rounded-xl border border-[#1d2a22] px-4 text-sm text-[#a9b7ae] hover:bg-[#162019] hover:text-[#e8efe9]" asChild>
|
||||
<a href={githubLink} target="_blank" rel="noreferrer">开源仓库</a>
|
||||
</Button>
|
||||
{!isLegalPage ? (
|
||||
<Button variant="ghost" className="h-11 justify-start rounded-xl border border-[#1d2a22] px-4 text-sm text-[#a9b7ae] hover:bg-[#162019] hover:text-[#e8efe9]" asChild>
|
||||
<a href={githubLink} target="_blank" rel="noreferrer">开源仓库</a>
|
||||
</Button>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="grid gap-2 sm:grid-cols-2">
|
||||
{!isLoggedIn && (
|
||||
@@ -132,6 +148,15 @@ const Header = () => {
|
||||
|
||||
<nav className="hidden min-w-0 flex-1 items-center justify-center md:flex">
|
||||
<div className="flex items-center rounded-full border border-[#1d2a22] bg-[#111814]/85 p-1">
|
||||
{isLegalPage ? (
|
||||
<Link
|
||||
to="/"
|
||||
className="inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm text-[#7a8c80] transition-colors hover:text-[#e8efe9]"
|
||||
>
|
||||
<IconArrowLeft className="size-4" />
|
||||
返回首页
|
||||
</Link>
|
||||
) : null}
|
||||
{navItems.map((item) => (
|
||||
<Link
|
||||
key={item.to}
|
||||
@@ -154,23 +179,20 @@ const Header = () => {
|
||||
>
|
||||
文档
|
||||
</a>
|
||||
<a
|
||||
href={githubLink}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="rounded-full px-4 py-2 text-sm text-[#7a8c80] transition-colors hover:text-[#e8efe9]"
|
||||
>
|
||||
开源
|
||||
</a>
|
||||
{!isLegalPage ? (
|
||||
<a
|
||||
href={githubLink}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="rounded-full px-4 py-2 text-sm text-[#7a8c80] transition-colors hover:text-[#e8efe9]"
|
||||
>
|
||||
开源
|
||||
</a>
|
||||
) : null}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div className="ml-auto hidden items-center gap-3 md:flex">
|
||||
<div className="hidden rounded-full border border-[#1d2a22] bg-[#111814]/90 px-3 py-2 text-[11px] uppercase tracking-[0.22em] text-[#7a8c80] lg:flex lg:items-center lg:gap-2">
|
||||
<IconPointFilled className="size-3 text-[#7cf29c]" />
|
||||
Build 2.4.1
|
||||
</div>
|
||||
|
||||
{!isLoggedIn && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import React from "react";
|
||||
import { TerminalFooter, TerminalHeader } from "./terminal-chrome";
|
||||
|
||||
type LegalSection = {
|
||||
id: string;
|
||||
title: string;
|
||||
content?: string[];
|
||||
items?: string[];
|
||||
note?: string;
|
||||
footer?: React.ReactNode;
|
||||
};
|
||||
|
||||
const themeVars = {
|
||||
"--a-bg": "#0a0d0a",
|
||||
"--a-bg-2": "#0d1210",
|
||||
"--a-panel": "#111814",
|
||||
"--a-line": "#1d2a22",
|
||||
"--a-line-2": "#243329",
|
||||
"--a-fg": "#c9d6cc",
|
||||
"--a-fg-dim": "#7a8c80",
|
||||
"--a-fg-mute": "#4a5b50",
|
||||
"--a-accent": "#7cf29c",
|
||||
} as React.CSSProperties;
|
||||
|
||||
export default function LegalTerminalPage({
|
||||
eyebrow,
|
||||
title,
|
||||
subtitle,
|
||||
lastUpdated,
|
||||
tags,
|
||||
sections,
|
||||
}: {
|
||||
eyebrow: string;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
lastUpdated: string;
|
||||
tags: string[];
|
||||
sections: LegalSection[];
|
||||
}) {
|
||||
return (
|
||||
<div style={themeVars} className="min-h-screen bg-[var(--a-bg)] text-[var(--a-fg)]">
|
||||
<div className="pointer-events-none fixed inset-0 bg-[radial-gradient(circle_at_top_left,rgba(124,242,156,0.12),transparent_28%),radial-gradient(circle_at_top_right,rgba(97,218,251,0.08),transparent_22%),linear-gradient(180deg,#090c09_0%,#0b0f0c_48%,#0a0d0a_100%)]" />
|
||||
<TerminalHeader homeAnchors={false} />
|
||||
|
||||
<main className="relative z-10 mx-auto max-w-[1280px] px-5 pb-12 pt-[108px] sm:px-8 sm:pb-16 sm:pt-[120px]">
|
||||
<section className="relative overflow-hidden rounded-[24px] border border-[var(--a-line-2)] bg-[linear-gradient(135deg,rgba(17,24,20,0.98),rgba(13,18,16,0.95))] p-7 shadow-[0_30px_60px_-30px_rgba(0,0,0,0.7)] sm:p-10">
|
||||
<div className="pointer-events-none absolute right-[-60px] top-[-80px] h-64 w-64 rounded-full bg-[radial-gradient(circle,rgba(124,242,156,0.14),transparent_70%)] blur-3xl" />
|
||||
<div className="relative">
|
||||
<div className="inline-flex items-center rounded-full border border-[rgba(124,242,156,0.18)] bg-[rgba(124,242,156,0.08)] px-3 py-1 text-[11px] tracking-[0.12em] text-[var(--a-accent)]">
|
||||
{eyebrow}
|
||||
</div>
|
||||
<h1 className="mt-6 text-4xl font-semibold leading-[1.04] tracking-[-0.04em] text-white sm:text-5xl lg:text-[60px]">{title}</h1>
|
||||
<p className="mt-5 max-w-[820px] text-sm leading-8 text-[var(--a-fg-dim)] sm:text-[15px]">{subtitle}</p>
|
||||
<div className="mt-7 flex flex-wrap gap-3 text-[11px] tracking-[0.06em] text-[var(--a-fg-dim)]">
|
||||
<span className="rounded border border-[var(--a-line-2)] bg-[var(--a-panel)] px-3 py-2">最近更新:{lastUpdated}</span>
|
||||
{tags.map((tag) => (
|
||||
<span key={tag} className="rounded border border-[var(--a-line-2)] bg-[var(--a-panel)] px-3 py-2">
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="mt-8 grid gap-6 lg:grid-cols-[280px_minmax(0,1fr)]">
|
||||
<aside className="h-fit rounded-[20px] border border-[var(--a-line)] bg-[var(--a-panel)] p-5 lg:sticky lg:top-24">
|
||||
<div className="text-[11px] tracking-[0.12em] text-[var(--a-accent)]"># 目录</div>
|
||||
<nav className="mt-4 space-y-1">
|
||||
{sections.map((section, index) => (
|
||||
<a
|
||||
key={section.id}
|
||||
href={`#${section.id}`}
|
||||
className="flex items-start gap-3 rounded-[10px] px-3 py-2 text-sm text-[var(--a-fg-dim)] transition-colors hover:bg-[rgba(124,242,156,0.05)] hover:text-[var(--a-fg)]"
|
||||
>
|
||||
<span className="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-[4px] border border-[var(--a-line-2)] text-[10px] text-[var(--a-accent)]">
|
||||
{index + 1}
|
||||
</span>
|
||||
<span>{section.title}</span>
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<article className="rounded-[20px] border border-[var(--a-line)] bg-[var(--a-panel)] p-6 sm:p-8">
|
||||
{sections.map((section, index) => (
|
||||
<section
|
||||
id={section.id}
|
||||
key={section.id}
|
||||
className={cn(index === 0 ? "" : "mt-8 border-t border-[var(--a-line)] pt-8")}
|
||||
>
|
||||
<div className="inline-flex items-center rounded-full border border-[rgba(124,242,156,0.16)] bg-[rgba(124,242,156,0.06)] px-3 py-1 text-[11px] tracking-[0.12em] text-[var(--a-accent)]">
|
||||
Section {String(index + 1).padStart(2, "0")}
|
||||
</div>
|
||||
<h2 className="mt-4 text-[28px] font-semibold tracking-[-0.03em] text-white">{section.title}</h2>
|
||||
{section.content?.map((paragraph) => (
|
||||
<p key={paragraph} className="mt-4 text-[15px] leading-8 text-[var(--a-fg-dim)]">
|
||||
{paragraph}
|
||||
</p>
|
||||
))}
|
||||
{section.items ? (
|
||||
<ul className="mt-5 space-y-3">
|
||||
{section.items.map((item) => (
|
||||
<li key={item} className="flex gap-3 text-[15px] leading-8 text-[var(--a-fg-dim)]">
|
||||
<span className="mt-[11px] size-1.5 shrink-0 rounded-full bg-[var(--a-accent)]" />
|
||||
<span>{item}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
{section.note ? (
|
||||
<div className="mt-5 rounded-[16px] border border-[var(--a-line-2)] bg-[var(--a-bg-2)] px-5 py-4 text-[15px] leading-8 text-[var(--a-fg-dim)]">
|
||||
{section.note}
|
||||
</div>
|
||||
) : null}
|
||||
{section.footer ? <div className="mt-4 text-[15px] leading-8 text-[var(--a-fg-dim)]">{section.footer}</div> : null}
|
||||
</section>
|
||||
))}
|
||||
</article>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<TerminalFooter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export type { LegalSection };
|
||||
@@ -0,0 +1,273 @@
|
||||
import { useAuth } from "@/components/auth-provider";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { IconArrowRight, IconMenu2, IconPointFilled } from "@tabler/icons-react";
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const DOCS_LINK = "https://monkeycode.docs.baizhi.cloud/";
|
||||
const GITHUB_LINK = "https://github.com/chaitin/MonkeyCode/";
|
||||
const FORUM_LINK = "https://bbs.baizhi.cloud/";
|
||||
const MODEL_SQUARE_LINK = "https://baizhi.cloud/landing/model-square";
|
||||
const CHAITIN_LINK = "https://www.chaitin.cn/";
|
||||
const BAIZHI_LINK = "https://www.baizhi.cloud/";
|
||||
|
||||
const resourceLinks = [
|
||||
{ title: "产品文档", href: DOCS_LINK },
|
||||
{ title: "技术论坛", href: FORUM_LINK },
|
||||
{ title: "开源仓库", href: GITHUB_LINK },
|
||||
{ title: "模型广场", href: MODEL_SQUARE_LINK },
|
||||
];
|
||||
|
||||
const aboutLinks = [
|
||||
{ title: "长亭科技", href: CHAITIN_LINK },
|
||||
{ title: "长亭百智云", href: BAIZHI_LINK },
|
||||
{ title: "隐私政策", href: "/privacy-policy" },
|
||||
{ title: "用户协议", href: "/user-agreement" },
|
||||
];
|
||||
|
||||
const communityCards = [
|
||||
{ label: "微信群", src: "/wechat.png", alt: "微信二维码" },
|
||||
{ label: "飞书群", src: "/feishu.png", alt: "飞书群二维码" },
|
||||
{ label: "钉钉群", src: "/dingtalk.png", alt: "钉钉群二维码" },
|
||||
];
|
||||
|
||||
function LogoWordmark({ href }: { href: string }) {
|
||||
return (
|
||||
<a href={href} className="inline-flex items-center gap-3">
|
||||
<img src="/logo-colored.png" alt="MonkeyCode" className="size-8" />
|
||||
<span className="text-[17px] font-semibold tracking-[-0.02em] text-white">
|
||||
Monkey<span className="text-[var(--a-accent)]">Code</span>
|
||||
</span>
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
function HeaderAction({
|
||||
to,
|
||||
href,
|
||||
external,
|
||||
children,
|
||||
primary,
|
||||
}: {
|
||||
to?: string;
|
||||
href?: string;
|
||||
external?: boolean;
|
||||
children: React.ReactNode;
|
||||
primary?: boolean;
|
||||
}) {
|
||||
const className = cn(
|
||||
"inline-flex items-center justify-center gap-2 rounded-[4px] border px-3.5 py-2 text-[13px] transition-colors",
|
||||
primary
|
||||
? "border-[rgba(124,242,156,0.3)] bg-[var(--a-accent)] text-[var(--a-bg)] shadow-[0_0_24px_rgba(124,242,156,0.24)] hover:bg-[#93f7ae]"
|
||||
: "border-[var(--a-line-2)] bg-[var(--a-panel)] text-[var(--a-fg)] hover:bg-[#162019] hover:text-white"
|
||||
);
|
||||
|
||||
if (to) return <Link to={to} className={className}>{children}</Link>;
|
||||
|
||||
return (
|
||||
<a href={href} target={external ? "_blank" : undefined} rel={external ? "noreferrer" : undefined} className={className}>
|
||||
{children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
function FooterLinkItem({ title, href }: { title: string; href: string }) {
|
||||
if (href.startsWith("/")) {
|
||||
return (
|
||||
<Link to={href} className="block py-1.5 text-sm text-[var(--a-fg-dim)] transition-colors hover:text-[var(--a-fg)]">
|
||||
{title}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<a href={href} target="_blank" rel="noreferrer" className="block py-1.5 text-sm text-[var(--a-fg-dim)] transition-colors hover:text-[var(--a-fg)]">
|
||||
{title}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
export function TerminalHeader({ homeAnchors = true }: { homeAnchors?: boolean }) {
|
||||
const { isLoggedIn } = useAuth();
|
||||
const [isScrolled, setIsScrolled] = React.useState(false);
|
||||
const [menuOpen, setMenuOpen] = React.useState(false);
|
||||
const inviterId = typeof window !== "undefined" ? localStorage.getItem("ic") || "" : "";
|
||||
const signUpLink = `/api/v1/users/login?redirect=&inviter_id=${inviterId}`;
|
||||
const navPrefix = homeAnchors ? "" : "/";
|
||||
|
||||
const pageNav = [
|
||||
{ label: "介绍", href: `${navPrefix}#hero` },
|
||||
{ label: "特色", href: `${navPrefix}#features` },
|
||||
{ label: "场景", href: `${navPrefix}#usecases` },
|
||||
{ label: "套餐", href: `${navPrefix}#pricing` },
|
||||
{ label: "文档", href: DOCS_LINK, external: true },
|
||||
];
|
||||
|
||||
React.useEffect(() => {
|
||||
const handleScroll = () => setIsScrolled(window.scrollY > 4);
|
||||
handleScroll();
|
||||
window.addEventListener("scroll", handleScroll);
|
||||
return () => window.removeEventListener("scroll", handleScroll);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<header
|
||||
className={cn(
|
||||
"fixed inset-x-0 top-0 z-50 border-b border-[var(--a-line)] backdrop-blur-xl transition-colors",
|
||||
isScrolled ? "bg-[rgba(10,13,10,0.94)]" : "bg-[rgba(10,13,10,0.85)]"
|
||||
)}
|
||||
>
|
||||
<div className="mx-auto flex max-w-[1280px] items-center gap-5 px-4 py-3 sm:px-8">
|
||||
<div className="flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setMenuOpen((value) => !value)}
|
||||
className="inline-flex size-10 items-center justify-center rounded-[4px] border border-[var(--a-line-2)] bg-[var(--a-panel)] text-[var(--a-fg)] transition-colors hover:bg-[#162019] md:hidden"
|
||||
aria-label="切换导航菜单"
|
||||
>
|
||||
<IconMenu2 className="size-5" />
|
||||
</button>
|
||||
|
||||
<LogoWordmark href={homeAnchors ? "#hero" : "/"} />
|
||||
</div>
|
||||
|
||||
<nav className="hidden items-center gap-1 md:flex">
|
||||
{pageNav.map((item) =>
|
||||
item.external ? (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="px-2.5 py-1.5 text-[13px] text-[var(--a-fg-dim)] transition-colors hover:text-white"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
) : (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
className="px-2.5 py-1.5 text-[13px] text-[var(--a-fg-dim)] transition-colors hover:text-white"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
)
|
||||
)}
|
||||
</nav>
|
||||
|
||||
<div className="ml-auto hidden items-center gap-2 md:flex">
|
||||
{!isLoggedIn ? (
|
||||
<>
|
||||
<HeaderAction href={signUpLink}>注册</HeaderAction>
|
||||
<HeaderAction to="/login" primary>
|
||||
登录
|
||||
</HeaderAction>
|
||||
</>
|
||||
) : (
|
||||
<HeaderAction to="/console" primary>
|
||||
进入控制台 <IconArrowRight className="size-4" />
|
||||
</HeaderAction>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{menuOpen ? (
|
||||
<div className="mt-4 space-y-4 border-t border-[var(--a-line)] pt-4 md:hidden">
|
||||
<div className="flex items-center gap-2 text-[11px] uppercase tracking-[0.22em] text-[var(--a-fg-dim)]">
|
||||
<IconPointFilled className="size-3 text-[var(--a-accent)]" />
|
||||
System Online
|
||||
</div>
|
||||
<div className="grid gap-2">
|
||||
{pageNav.map((item) =>
|
||||
item.external ? (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="rounded-[4px] border border-[var(--a-line)] px-4 py-3 text-sm text-[var(--a-fg)] transition-colors hover:bg-[#162019]"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
) : (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="rounded-[4px] border border-[var(--a-line)] px-4 py-3 text-sm text-[var(--a-fg)] transition-colors hover:bg-[#162019]"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
<div className="grid gap-2 sm:grid-cols-2">
|
||||
{!isLoggedIn ? (
|
||||
<>
|
||||
<HeaderAction href={signUpLink}>注册</HeaderAction>
|
||||
<HeaderAction to="/login" primary>
|
||||
登录
|
||||
</HeaderAction>
|
||||
</>
|
||||
) : (
|
||||
<HeaderAction to="/console" primary>
|
||||
进入控制台 <IconArrowRight className="size-4" />
|
||||
</HeaderAction>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
export function TerminalFooter() {
|
||||
return (
|
||||
<footer id="community" className="relative z-10 mt-10 border-t border-[var(--a-line)] px-5 pb-8 pt-14 sm:px-8">
|
||||
<div className="mx-auto max-w-[1280px]">
|
||||
<div className="grid gap-10 xl:grid-cols-[1.3fr_0.8fr_0.8fr_1.5fr]">
|
||||
<div>
|
||||
<LogoWordmark href="/#hero" />
|
||||
<p className="mt-5 max-w-[320px] text-sm leading-7 text-[var(--a-fg-dim)]">
|
||||
免费使用,无需安装,内置云端开发环境,并支持业内最全的顶尖大模型。无论是开发项目、做调研、写文档,还是分析数据、处理任务,打开浏览器就能随时开始,让 AI 持续帮你推进工作。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="mb-4 text-[11px] font-semibold tracking-[0.08em] text-[var(--a-fg)]"># 资源</div>
|
||||
{resourceLinks.map((item) => (
|
||||
<FooterLinkItem key={item.title} title={item.title} href={item.href} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="mb-4 text-[11px] font-semibold tracking-[0.08em] text-[var(--a-fg)]"># 关于我们</div>
|
||||
{aboutLinks.map((item) => (
|
||||
<FooterLinkItem key={item.title} title={item.title} href={item.href} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="mb-4 text-[11px] font-semibold tracking-[0.08em] text-[var(--a-fg)]"># 技术交流群</div>
|
||||
<div className="grid gap-4 sm:grid-cols-3">
|
||||
{communityCards.map((item) => (
|
||||
<div key={item.label} className="text-center">
|
||||
<img src={item.src} alt={item.alt} className="mx-auto aspect-square w-full rounded-sm object-cover" />
|
||||
<div className="mt-2 text-[11px] tracking-[0.04em] text-[var(--a-fg-dim)]">{item.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-10 flex flex-col gap-3 border-t border-dashed border-[var(--a-line-2)] pt-5 text-[11px] tracking-[0.06em] text-[var(--a-fg-mute)] sm:flex-row sm:items-center sm:justify-between">
|
||||
<span>© 2026 MonkeyCode · 版权所有:北京长亭科技有限公司 · 本应用由 MonkeyCode 开发</span>
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noreferrer" className="transition-colors hover:text-[var(--a-fg)]">
|
||||
京ICP备2024055124号-12
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
@@ -2,17 +2,13 @@ import { useAuth } from "@/components/auth-provider";
|
||||
import Icon from "@/components/common/Icon";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { IconArrowRight, IconFile, IconFilePencil, IconFolder, IconFolderOpen, IconMenu2, IconPointFilled, IconSend } from "@tabler/icons-react";
|
||||
import { IconArrowRight, IconFile, IconFilePencil, IconFolder, IconFolderOpen, IconSend } from "@tabler/icons-react";
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { TerminalFooter, TerminalHeader } from "./terminal-chrome";
|
||||
|
||||
const DOCS_LINK = "https://monkeycode.docs.baizhi.cloud/";
|
||||
const GITHUB_LINK = "https://github.com/chaitin/MonkeyCode/";
|
||||
const FORUM_LINK = "https://bbs.baizhi.cloud/";
|
||||
const MODEL_SQUARE_LINK = "https://baizhi.cloud/landing/model-square";
|
||||
const CONSULT_LINK = "https://baizhi.cloud/consult";
|
||||
const CHAITIN_LINK = "https://www.chaitin.cn/";
|
||||
const BAIZHI_LINK = "https://www.baizhi.cloud/";
|
||||
|
||||
const themeVars = {
|
||||
"--a-bg": "#0a0d0a",
|
||||
@@ -32,14 +28,6 @@ const themeVars = {
|
||||
"--a-purple": "#c39bff",
|
||||
} as React.CSSProperties;
|
||||
|
||||
const pageNav = [
|
||||
{ label: "介绍", href: "#hero" },
|
||||
{ label: "特色", href: "#features" },
|
||||
{ label: "场景", href: "#usecases" },
|
||||
{ label: "套餐", href: "#pricing" },
|
||||
{ label: "文档", href: DOCS_LINK, external: true },
|
||||
];
|
||||
|
||||
const featureItems = [
|
||||
{
|
||||
key: "01",
|
||||
@@ -248,26 +236,6 @@ const faqItems = [
|
||||
},
|
||||
];
|
||||
|
||||
const resourceLinks = [
|
||||
{ title: "产品文档", href: DOCS_LINK },
|
||||
{ title: "技术论坛", href: FORUM_LINK },
|
||||
{ title: "开源仓库", href: GITHUB_LINK },
|
||||
{ title: "模型广场", href: MODEL_SQUARE_LINK },
|
||||
];
|
||||
|
||||
const aboutLinks = [
|
||||
{ title: "长亭科技", href: CHAITIN_LINK },
|
||||
{ title: "长亭百智云", href: BAIZHI_LINK },
|
||||
{ title: "隐私政策", href: "/privacy-policy" },
|
||||
{ title: "用户协议", href: "/user-agreement" },
|
||||
];
|
||||
|
||||
const communityCards = [
|
||||
{ label: "微信群", src: "/wechat.png", alt: "微信二维码" },
|
||||
{ label: "飞书群", src: "/feishu.png", alt: "飞书群二维码" },
|
||||
{ label: "钉钉群", src: "/dingtalk.png", alt: "钉钉群二维码" },
|
||||
];
|
||||
|
||||
type HeroFileTreeItem = {
|
||||
name: string;
|
||||
type: "folder" | "file";
|
||||
@@ -293,38 +261,6 @@ const heroFileTree: HeroFileTreeItem[] = [
|
||||
{ name: "README.md", type: "file" },
|
||||
];
|
||||
|
||||
function LogoMark({
|
||||
size = 28,
|
||||
color = "currentColor",
|
||||
accent = "currentColor",
|
||||
}: {
|
||||
size?: number;
|
||||
color?: string;
|
||||
accent?: string;
|
||||
}) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 32 32" fill="none" aria-hidden="true">
|
||||
<rect x="2" y="4" width="28" height="24" rx="6" stroke={color} strokeWidth="2" fill="none" />
|
||||
<circle cx="7" cy="7" r="2.5" fill={color} />
|
||||
<circle cx="25" cy="7" r="2.5" fill={color} />
|
||||
<path d="M10 14 Q 8 16 10 18" stroke={accent} strokeWidth="2" strokeLinecap="round" fill="none" />
|
||||
<path d="M22 14 Q 24 16 22 18" stroke={accent} strokeWidth="2" strokeLinecap="round" fill="none" />
|
||||
<path d="M13 22 L 19 22" stroke={color} strokeWidth="2" strokeLinecap="round" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
function LogoWordmark() {
|
||||
return (
|
||||
<div className="flex items-center gap-3 text-[15px] font-semibold tracking-[-0.02em] text-[var(--a-fg)]">
|
||||
<LogoMark size={24} color="var(--a-fg)" accent="var(--a-accent)" />
|
||||
<span>
|
||||
Monkey<span className="text-[var(--a-accent)]">Code</span>
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SectionShell({
|
||||
id,
|
||||
index,
|
||||
@@ -419,36 +355,9 @@ function HeaderAction({
|
||||
);
|
||||
}
|
||||
|
||||
function FooterLinkItem({ title, href }: { title: string; href: string }) {
|
||||
if (href.startsWith("/")) {
|
||||
return (
|
||||
<Link to={href} className="block py-1.5 text-sm text-[var(--a-fg-dim)] transition-colors hover:text-[var(--a-fg)]">
|
||||
{title}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<a href={href} target="_blank" rel="noreferrer" className="block py-1.5 text-sm text-[var(--a-fg-dim)] transition-colors hover:text-[var(--a-fg)]">
|
||||
{title}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
export default function TerminalNativePage() {
|
||||
const { isLoggedIn } = useAuth();
|
||||
const [isScrolled, setIsScrolled] = React.useState(false);
|
||||
const [menuOpen, setMenuOpen] = React.useState(false);
|
||||
const [openFaq, setOpenFaq] = React.useState(0);
|
||||
const inviterId = typeof window !== "undefined" ? localStorage.getItem("ic") || "" : "";
|
||||
const signUpLink = `/api/v1/users/login?redirect=&inviter_id=${inviterId}`;
|
||||
|
||||
React.useEffect(() => {
|
||||
const handleScroll = () => setIsScrolled(window.scrollY > 4);
|
||||
handleScroll();
|
||||
window.addEventListener("scroll", handleScroll);
|
||||
return () => window.removeEventListener("scroll", handleScroll);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -489,116 +398,7 @@ export default function TerminalNativePage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<header
|
||||
className={cn(
|
||||
"fixed inset-x-0 top-0 z-50 border-b border-[var(--a-line)] backdrop-blur-xl transition-colors",
|
||||
isScrolled ? "bg-[rgba(10,13,10,0.94)]" : "bg-[rgba(10,13,10,0.85)]"
|
||||
)}
|
||||
>
|
||||
<div className="mx-auto flex max-w-[1280px] items-center gap-5 px-4 py-3 sm:px-8">
|
||||
<div className="flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setMenuOpen((value) => !value)}
|
||||
className="inline-flex size-10 items-center justify-center rounded-[4px] border border-[var(--a-line-2)] bg-[var(--a-panel)] text-[var(--a-fg)] transition-colors hover:bg-[#162019] md:hidden"
|
||||
aria-label="切换导航菜单"
|
||||
>
|
||||
<IconMenu2 className="size-5" />
|
||||
</button>
|
||||
|
||||
<a href="#hero" className="shrink-0">
|
||||
<LogoWordmark />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<nav className="hidden items-center gap-1 md:flex">
|
||||
{pageNav.map((item) =>
|
||||
item.external ? (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="px-2.5 py-1.5 text-[13px] text-[var(--a-fg-dim)] transition-colors hover:text-white"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
) : (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
className="px-2.5 py-1.5 text-[13px] text-[var(--a-fg-dim)] transition-colors hover:text-white"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
)
|
||||
)}
|
||||
</nav>
|
||||
|
||||
<div className="ml-auto hidden items-center gap-2 md:flex">
|
||||
{!isLoggedIn ? (
|
||||
<>
|
||||
<HeaderAction href={signUpLink}>注册</HeaderAction>
|
||||
<HeaderAction to="/login" primary>
|
||||
登录
|
||||
</HeaderAction>
|
||||
</>
|
||||
) : (
|
||||
<HeaderAction to="/console" primary>
|
||||
进入控制台 →
|
||||
</HeaderAction>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{menuOpen ? (
|
||||
<div className="mt-4 space-y-4 border-t border-[var(--a-line)] pt-4 md:hidden">
|
||||
<div className="flex items-center gap-2 text-[11px] uppercase tracking-[0.22em] text-[var(--a-fg-dim)]">
|
||||
<IconPointFilled className="size-3 text-[var(--a-accent)]" />
|
||||
System Online
|
||||
</div>
|
||||
<div className="grid gap-2">
|
||||
{pageNav.map((item) =>
|
||||
item.external ? (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="rounded-[4px] border border-[var(--a-line)] px-4 py-3 text-sm text-[var(--a-fg)] transition-colors hover:bg-[#162019]"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
) : (
|
||||
<a
|
||||
key={item.label}
|
||||
href={item.href}
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="rounded-[4px] border border-[var(--a-line)] px-4 py-3 text-sm text-[var(--a-fg)] transition-colors hover:bg-[#162019]"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
<div className="grid gap-2 sm:grid-cols-2">
|
||||
{!isLoggedIn ? (
|
||||
<>
|
||||
<HeaderAction href={signUpLink}>注册</HeaderAction>
|
||||
<HeaderAction to="/login" primary>
|
||||
登录
|
||||
</HeaderAction>
|
||||
</>
|
||||
) : (
|
||||
<HeaderAction to="/console" primary>
|
||||
进入控制台 →
|
||||
</HeaderAction>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</header>
|
||||
<TerminalHeader />
|
||||
|
||||
<main className="relative z-10 pt-[88px] sm:pt-[92px]">
|
||||
<section id="hero" className="mx-auto max-w-[1280px] px-5 pb-10 pt-8 sm:px-8 sm:pt-12 sm:pb-16">
|
||||
@@ -983,51 +783,7 @@ export default function TerminalNativePage() {
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer id="community" className="relative z-10 mt-10 border-t border-[var(--a-line)] px-5 pb-8 pt-14 sm:px-8">
|
||||
<div className="mx-auto max-w-[1280px]">
|
||||
<div className="grid gap-10 xl:grid-cols-[1.3fr_0.8fr_0.8fr_1.5fr]">
|
||||
<div>
|
||||
<LogoWordmark />
|
||||
<p className="mt-5 max-w-[320px] text-sm leading-7 text-[var(--a-fg-dim)]">
|
||||
免费使用,无需安装,内置云端开发环境,并支持业内最全的顶尖大模型。无论是开发项目、做调研、写文档,还是分析数据、处理任务,打开浏览器就能随时开始,让 AI 持续帮你推进工作。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="mb-4 text-[11px] font-semibold tracking-[0.08em] text-[var(--a-fg)]"># 资源</div>
|
||||
{resourceLinks.map((item) => (
|
||||
<FooterLinkItem key={item.title} title={item.title} href={item.href} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="mb-4 text-[11px] font-semibold tracking-[0.08em] text-[var(--a-fg)]"># 关于我们</div>
|
||||
{aboutLinks.map((item) => (
|
||||
<FooterLinkItem key={item.title} title={item.title} href={item.href} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="mb-4 text-[11px] font-semibold tracking-[0.08em] text-[var(--a-fg)]"># 技术交流群</div>
|
||||
<div className="grid gap-4 sm:grid-cols-3">
|
||||
{communityCards.map((item) => (
|
||||
<div key={item.label} className="text-center">
|
||||
<img src={item.src} alt={item.alt} className="mx-auto aspect-square w-full rounded-sm object-cover" />
|
||||
<div className="mt-2 text-[11px] tracking-[0.04em] text-[var(--a-fg-dim)]">{item.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-10 flex flex-col gap-3 border-t border-dashed border-[var(--a-line-2)] pt-5 text-[11px] tracking-[0.06em] text-[var(--a-fg-mute)] sm:flex-row sm:items-center sm:justify-between">
|
||||
<span>© 2026 MonkeyCode · 版权所有:北京长亭科技有限公司 · 本应用由 MonkeyCode 开发</span>
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noreferrer" className="transition-colors hover:text-[var(--a-fg)]">
|
||||
京ICP备2024055124号-12
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<TerminalFooter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
FieldGroup,
|
||||
FieldLabel,
|
||||
} from "@/components/ui/field"
|
||||
import { Checkbox } from "@/components/ui/checkbox"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import {
|
||||
Tabs,
|
||||
@@ -39,10 +40,17 @@ export default function LoginPage({
|
||||
const [showUserPassword, setShowUserPassword] = React.useState(false)
|
||||
const [showManagerPassword, setShowManagerPassword] = React.useState(false)
|
||||
const [userLoginView, setUserLoginView] = React.useState<'choices' | 'password'>('choices')
|
||||
const [agreedToTerms, setAgreedToTerms] = React.useState(true)
|
||||
const navigate = useNavigate()
|
||||
const inviterId = typeof window !== 'undefined' ? (localStorage.getItem('ic') || '') : ''
|
||||
const userLoginHref = `/api/v1/users/login?redirect=&inviter_id=${inviterId}`
|
||||
|
||||
const ensureTermsAccepted = React.useCallback(() => {
|
||||
if (agreedToTerms) return true
|
||||
toast.error('请先阅读并同意用户协议')
|
||||
return false
|
||||
}, [agreedToTerms])
|
||||
|
||||
React.useEffect(() => {
|
||||
try {
|
||||
const savedUser = localStorage.getItem(USER_STORAGE_KEY)
|
||||
@@ -63,6 +71,8 @@ export default function LoginPage({
|
||||
}, [])
|
||||
|
||||
const handleUserLogin = async () => {
|
||||
if (!ensureTermsAccepted()) return
|
||||
|
||||
if (userEmail.trim() === '' || userPassword.trim() === '') {
|
||||
toast.error('请输入账号和密码')
|
||||
return
|
||||
@@ -91,6 +101,8 @@ export default function LoginPage({
|
||||
}
|
||||
|
||||
const handleTeamManagerLogin = async () => {
|
||||
if (!ensureTermsAccepted()) return
|
||||
|
||||
if (teamManagerEmail.trim() === '' || teamManagerPassword.trim() === '') {
|
||||
toast.error('请输入账号和密码')
|
||||
return
|
||||
@@ -140,7 +152,16 @@ export default function LoginPage({
|
||||
<div className="mt-1 flex flex-col gap-4">
|
||||
<div className="text-sm font-medium">选择登录方式</div>
|
||||
<Button size="lg" className="w-full" asChild>
|
||||
<a href={userLoginHref}>百智云登录 - 推荐</a>
|
||||
<a
|
||||
href={userLoginHref}
|
||||
onClick={(e) => {
|
||||
if (!ensureTermsAccepted()) {
|
||||
e.preventDefault()
|
||||
}
|
||||
}}
|
||||
>
|
||||
百智云登录 - 推荐
|
||||
</a>
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
@@ -152,7 +173,16 @@ export default function LoginPage({
|
||||
账号密码登录
|
||||
</Button>
|
||||
<Button size="lg" variant="secondary" className="w-full" asChild>
|
||||
<a href={userLoginHref}>快速注册</a>
|
||||
<a
|
||||
href={userLoginHref}
|
||||
onClick={(e) => {
|
||||
if (!ensureTermsAccepted()) {
|
||||
e.preventDefault()
|
||||
}
|
||||
}}
|
||||
>
|
||||
快速注册
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
@@ -207,7 +237,7 @@ export default function LoginPage({
|
||||
</div>
|
||||
</Field>
|
||||
<Field>
|
||||
<Button type="submit" disabled={logging} className="w-full">
|
||||
<Button type="submit" disabled={logging || !agreedToTerms} className="w-full">
|
||||
{logging && <Spinner className="mr-2" />}
|
||||
登录
|
||||
</Button>
|
||||
@@ -256,7 +286,7 @@ export default function LoginPage({
|
||||
</div>
|
||||
</Field>
|
||||
<Field>
|
||||
<Button type="submit" disabled={logging}>
|
||||
<Button type="submit" disabled={logging || !agreedToTerms}>
|
||||
{logging && <Spinner />}
|
||||
登录
|
||||
</Button>
|
||||
@@ -265,6 +295,21 @@ export default function LoginPage({
|
||||
</form>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
<div className="mt-5 flex items-start gap-3 rounded-lg border border-border/60 bg-muted/20 px-3 py-3">
|
||||
<Checkbox
|
||||
id="login-user-agreement"
|
||||
checked={agreedToTerms}
|
||||
onCheckedChange={(checked) => setAgreedToTerms(checked === true)}
|
||||
className="mt-0.5"
|
||||
/>
|
||||
<label htmlFor="login-user-agreement" className="text-sm leading-6 text-muted-foreground">
|
||||
我已阅读并同意
|
||||
{" "}
|
||||
<Link to="/user-agreement" target="_blank" rel="noreferrer" className="text-foreground hover:underline">
|
||||
《用户协议》
|
||||
</Link>
|
||||
</label>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { AuthProvider } from "@/components/auth-provider"
|
||||
import Footer from "@/components/welcome/footer"
|
||||
import Header from "@/components/welcome/header"
|
||||
import { AuthProvider } from "@/components/auth-provider";
|
||||
import LegalTerminalPage, { type LegalSection } from "@/components/welcome/legal-terminal-page";
|
||||
|
||||
const sections = [
|
||||
const sections: LegalSection[] = [
|
||||
{
|
||||
id: "collection",
|
||||
title: "我们可能收集的信息",
|
||||
@@ -88,95 +87,33 @@ const sections = [
|
||||
content: [
|
||||
"如您对本隐私政策或个人信息处理事项有任何疑问、意见或投诉建议,可通过官方渠道与我们联系。",
|
||||
],
|
||||
footer: (
|
||||
<>
|
||||
官方渠道:
|
||||
<a className="text-[var(--a-accent)] hover:underline" href="https://www.chaitin.cn/" target="_blank" rel="noreferrer">
|
||||
长亭科技官网
|
||||
</a>
|
||||
{" "}或{" "}
|
||||
<a className="text-[var(--a-accent)] hover:underline" href="https://www.baizhi.cloud/" target="_blank" rel="noreferrer">
|
||||
长亭百智云官网
|
||||
</a>
|
||||
。
|
||||
</>
|
||||
),
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
export default function PrivacyPolicyPage() {
|
||||
return (
|
||||
<AuthProvider>
|
||||
<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%)]">
|
||||
<Header />
|
||||
<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">
|
||||
<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">
|
||||
<div className="inline-flex items-center gap-3 rounded-full border border-white/20 bg-white/10 px-4 py-2 text-sm">
|
||||
<img src="/logo.png" alt="MonkeyCode Logo" className="size-6" />
|
||||
<span>MonkeyCode 智能开发平台</span>
|
||||
</div>
|
||||
<h1 className="mt-6 text-4xl font-bold leading-tight sm:text-5xl">隐私政策</h1>
|
||||
<p className="mt-4 max-w-3xl text-sm leading-7 text-white/80 sm:text-[15px]">
|
||||
我们重视您的个人信息与数据安全。本页面用于说明 MonkeyCode 智能开发平台在提供产品与服务过程中,如何收集、使用、存储、共享和保护与您相关的信息,以及您可以如何管理这些信息。
|
||||
</p>
|
||||
<div className="mt-6 flex flex-wrap gap-3 text-xs text-white/85 sm:text-sm">
|
||||
<span className="rounded-full bg-white/10 px-4 py-2">适用于官网与控制台服务</span>
|
||||
<span className="rounded-full bg-white/10 px-4 py-2">最近更新:2026-03-24</span>
|
||||
<span className="rounded-full bg-white/10 px-4 py-2">建议定期查看更新内容</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="grid gap-6 lg:grid-cols-[280px_minmax(0,1fr)]">
|
||||
<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">
|
||||
<h2 className="text-lg font-semibold text-slate-900">目录</h2>
|
||||
<nav className="mt-4 flex flex-col gap-1 text-sm">
|
||||
{sections.map((section, index) => (
|
||||
<a
|
||||
key={section.id}
|
||||
href={`#${section.id}`}
|
||||
className="rounded-xl px-3 py-2 text-slate-500 transition hover:bg-blue-50 hover:text-blue-600"
|
||||
>
|
||||
{index + 1}. {section.title}
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<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">
|
||||
{sections.map((section, index) => (
|
||||
<section
|
||||
id={section.id}
|
||||
key={section.id}
|
||||
className={index === 0 ? "" : "mt-8 border-t border-slate-900/10 pt-8"}
|
||||
>
|
||||
<span className="inline-flex rounded-full bg-blue-50 px-3 py-1 text-xs font-bold tracking-[0.04em] text-blue-600">
|
||||
Section {index + 1}
|
||||
</span>
|
||||
<h2 className="mt-4 text-2xl font-semibold text-slate-900">{section.title}</h2>
|
||||
{section.content?.map((paragraph) => (
|
||||
<p key={paragraph} className="mt-3 text-[15px] leading-7 text-slate-500">
|
||||
{paragraph}
|
||||
</p>
|
||||
))}
|
||||
{section.items ? (
|
||||
<ul className="mt-4 list-disc space-y-2 pl-5 text-[15px] leading-7 text-slate-500">
|
||||
{section.items.map((item) => (
|
||||
<li key={item}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
{section.note ? (
|
||||
<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">
|
||||
{section.note}
|
||||
</div>
|
||||
) : null}
|
||||
{section.id === "contact" ? (
|
||||
<p className="mt-4 text-[15px] leading-7 text-slate-500">
|
||||
官方渠道:
|
||||
<a className="text-blue-600 hover:underline" href="https://www.chaitin.cn/" target="_blank" rel="noreferrer">
|
||||
长亭科技官网
|
||||
</a>
|
||||
{' '}或{' '}
|
||||
<a className="text-blue-600 hover:underline" href="https://www.baizhi.cloud/" target="_blank" rel="noreferrer">
|
||||
长亭百智云官网
|
||||
</a>
|
||||
。
|
||||
</p>
|
||||
) : null}
|
||||
</section>
|
||||
))}
|
||||
</article>
|
||||
</section>
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
<LegalTerminalPage
|
||||
eyebrow="PRIVACY POLICY"
|
||||
title="隐私政策"
|
||||
subtitle="我们重视您的个人信息与数据安全。本页面用于说明 MonkeyCode 在提供产品与服务过程中,如何收集、使用、存储、共享和保护与您相关的信息,以及您可以如何管理这些信息。"
|
||||
lastUpdated="2026-03-24"
|
||||
tags={["适用于官网与控制台服务", "建议定期查看更新内容"]}
|
||||
sections={sections}
|
||||
/>
|
||||
</AuthProvider>
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
import { AuthProvider } from "@/components/auth-provider"
|
||||
import Footer from "@/components/welcome/footer"
|
||||
import Header from "@/components/welcome/header"
|
||||
import { AuthProvider } from "@/components/auth-provider";
|
||||
import LegalTerminalPage, { type LegalSection } from "@/components/welcome/legal-terminal-page";
|
||||
|
||||
const sections = [
|
||||
const sections: LegalSection[] = [
|
||||
{
|
||||
id: "scope",
|
||||
title: "协议适用范围",
|
||||
@@ -19,6 +18,7 @@ const sections = [
|
||||
"您应妥善保管账号、密码及登录凭证,并对账号下的行为承担相应责任。",
|
||||
"未经平台书面许可,您不得出租、出借、转让或售卖账号。",
|
||||
"如发现账号异常、被盗用或存在安全风险,应及时通知平台。",
|
||||
"账号仅限在合法、合规且经平台授权的范围内使用;如账号被用于违规、滥用、攻击、刷量或其他恶意目的,平台有权对账号采取限制、冻结或封禁等措施。",
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -40,6 +40,10 @@ const sections = [
|
||||
"攻击、干扰、绕过或破坏平台系统、接口、安全机制或服务稳定性。",
|
||||
"利用平台从事未经授权的数据抓取、作弊刷量、恶意调用或其他不正当行为。",
|
||||
"侵犯他人的知识产权、商业秘密、个人信息或其他合法权益。",
|
||||
"利用 MonkeyCode 制造、传播或协助开发带有网络攻击、入侵破坏、恶意控制、漏洞利用等性质的软件、脚本或工具。",
|
||||
"直接使用 MonkeyCode 或借助平台生成内容发起网络攻击、渗透破坏、恶意扫描、批量漏洞利用、拒绝服务攻击或其他危害网络与信息系统安全的行为。",
|
||||
"以盗取、冒用、转售、共享、绕过限制或其他未经授权的方式使用 MonkeyCode 的 API Token、账号能力或平台资源,并将其提供给其他 AI 工具、脚本、服务或第三方继续调用。",
|
||||
"通过批量注册、伪造身份、作弊邀请、脚本刷量、异常设备或其他恶意方式套取、盗刷、骗取邀请注册积分、活动奖励、补贴或其他平台权益。",
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -72,9 +76,14 @@ const sections = [
|
||||
{
|
||||
id: "termination",
|
||||
title: "协议终止与违约处理",
|
||||
content: [
|
||||
"为保障平台、其他用户及第三方的安全与合法权益,如用户存在违规使用账号的情形,平台有权依据违规性质、影响范围和风险程度采取相应处置措施。",
|
||||
],
|
||||
items: [
|
||||
"如您违反本协议或相关规则,平台有权视情节采取警示、限制功能、暂停服务、封禁账号等措施。",
|
||||
"您可依据平台提供的路径停止使用相关服务;账号注销后,平台将按规则处理相关数据。",
|
||||
"如平台认定您存在违规、滥用、欺诈、攻击、盗用资源或其他危害平台、用户或第三方安全与权益的行为,平台有权在不事先通知的情况下,对相关账号采取临时限制、永久封禁、冻结权益、清除异常奖励、终止服务等处理措施,并保留追究法律责任的权利。",
|
||||
"前述可导致封号或其他处置的行为,包括但不限于:使用 MonkeyCode 制造带有网络攻击性质的软件,直接使用 MonkeyCode 发起网络攻击,盗取或冒用 MonkeyCode API Token 供其他 AI 工具继续调用,以及通过批量注册、作弊邀请、脚本刷量等恶意行为盗刷邀请注册积分或其他平台权益。",
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -83,90 +92,33 @@ const sections = [
|
||||
content: [
|
||||
"若您对本协议有任何疑问、建议或投诉,可通过官方渠道与我们联系。",
|
||||
],
|
||||
footer: (
|
||||
<>
|
||||
官方渠道:
|
||||
<a className="text-[var(--a-accent)] hover:underline" href="https://www.chaitin.cn/" target="_blank" rel="noreferrer">
|
||||
长亭科技官网
|
||||
</a>
|
||||
{" "}或{" "}
|
||||
<a className="text-[var(--a-accent)] hover:underline" href="https://www.baizhi.cloud/" target="_blank" rel="noreferrer">
|
||||
长亭百智云官网
|
||||
</a>
|
||||
。
|
||||
</>
|
||||
),
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
export default function UserAgreementPage() {
|
||||
return (
|
||||
<AuthProvider>
|
||||
<div className="min-h-screen bg-[radial-gradient(circle_at_top_left,rgba(18,111,88,0.14),transparent_32%),radial-gradient(circle_at_top_right,rgba(255,177,66,0.16),transparent_26%),linear-gradient(180deg,#f7f8f2_0%,#fcfbf6_48%,#eef1e8_100%)]">
|
||||
<Header />
|
||||
<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">
|
||||
<section className="overflow-hidden rounded-[32px] border border-white/40 bg-[linear-gradient(135deg,rgba(28,52,40,0.95),rgba(43,118,92,0.92))] p-8 text-white shadow-[0_24px_80px_rgba(35,62,49,0.16)] sm:p-10">
|
||||
<div className="inline-flex items-center gap-3 rounded-full border border-white/20 bg-white/10 px-4 py-2 text-sm">
|
||||
<img src="/logo.png" alt="MonkeyCode Logo" className="size-6" />
|
||||
<span>MonkeyCode 智能开发平台</span>
|
||||
</div>
|
||||
<h1 className="mt-6 text-4xl font-bold leading-tight sm:text-5xl">用户协议</h1>
|
||||
<p className="mt-4 max-w-3xl text-sm leading-7 text-white/80 sm:text-[15px]">
|
||||
本协议用于说明您在使用 MonkeyCode 智能开发平台及相关服务时应遵守的规则,以及平台与您之间的权利义务关系。请在使用前认真阅读。
|
||||
</p>
|
||||
<div className="mt-6 flex flex-wrap gap-3 text-xs text-white/85 sm:text-sm">
|
||||
<span className="rounded-full bg-white/10 px-4 py-2">适用于官网与控制台服务</span>
|
||||
<span className="rounded-full bg-white/10 px-4 py-2">最近更新:2026-03-24</span>
|
||||
<span className="rounded-full bg-white/10 px-4 py-2">使用服务即视为同意本协议</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="grid gap-6 lg:grid-cols-[280px_minmax(0,1fr)]">
|
||||
<aside className="h-fit rounded-[28px] border border-slate-900/10 bg-white/85 p-6 shadow-[0_24px_80px_rgba(35,62,49,0.14)] backdrop-blur lg:sticky lg:top-6">
|
||||
<h2 className="text-lg font-semibold text-slate-900">目录</h2>
|
||||
<nav className="mt-4 flex flex-col gap-1 text-sm">
|
||||
{sections.map((section, index) => (
|
||||
<a
|
||||
key={section.id}
|
||||
href={`#${section.id}`}
|
||||
className="rounded-xl px-3 py-2 text-slate-500 transition hover:bg-emerald-50 hover:text-emerald-700"
|
||||
>
|
||||
{index + 1}. {section.title}
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<article className="rounded-[28px] border border-slate-900/10 bg-white/85 p-7 shadow-[0_24px_80px_rgba(35,62,49,0.14)] backdrop-blur sm:p-8">
|
||||
{sections.map((section, index) => (
|
||||
<section
|
||||
id={section.id}
|
||||
key={section.id}
|
||||
className={index === 0 ? "" : "mt-8 border-t border-slate-900/10 pt-8"}
|
||||
>
|
||||
<span className="inline-flex rounded-full bg-emerald-50 px-3 py-1 text-xs font-bold tracking-[0.04em] text-emerald-700">
|
||||
Section {index + 1}
|
||||
</span>
|
||||
<h2 className="mt-4 text-2xl font-semibold text-slate-900">{section.title}</h2>
|
||||
{section.content?.map((paragraph) => (
|
||||
<p key={paragraph} className="mt-3 text-[15px] leading-7 text-slate-500">
|
||||
{paragraph}
|
||||
</p>
|
||||
))}
|
||||
{section.items ? (
|
||||
<ul className="mt-4 list-disc space-y-2 pl-5 text-[15px] leading-7 text-slate-500">
|
||||
{section.items.map((item) => (
|
||||
<li key={item}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
{section.id === "contact" ? (
|
||||
<p className="mt-4 text-[15px] leading-7 text-slate-500">
|
||||
官方渠道:
|
||||
<a className="text-emerald-700 hover:underline" href="https://www.chaitin.cn/" target="_blank" rel="noreferrer">
|
||||
长亭科技官网
|
||||
</a>
|
||||
{' '}或{' '}
|
||||
<a className="text-emerald-700 hover:underline" href="https://www.baizhi.cloud/" target="_blank" rel="noreferrer">
|
||||
长亭百智云官网
|
||||
</a>
|
||||
。
|
||||
</p>
|
||||
) : null}
|
||||
</section>
|
||||
))}
|
||||
</article>
|
||||
</section>
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
<LegalTerminalPage
|
||||
eyebrow="USER AGREEMENT"
|
||||
title="用户协议"
|
||||
subtitle="本协议用于说明您在使用 MonkeyCode 及相关服务时应遵守的规则,以及平台与您之间的权利义务关系。请在使用前认真阅读。"
|
||||
lastUpdated="2026-03-24"
|
||||
tags={["适用于官网与控制台服务", "使用服务即视为同意本协议"]}
|
||||
sections={sections}
|
||||
/>
|
||||
</AuthProvider>
|
||||
)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user