[重构] 前端改造v1

This commit is contained in:
ryan
2026-03-11 12:47:08 +08:00
parent 052e3e98f8
commit 6eea676f8f
71 changed files with 3619 additions and 8791 deletions
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function ApplyLogsPage() {
return (
<ModulePageSkeleton
title='应用记录'
description='阶段 3 将在此接入过滤器、结果状态可视化与分页详情。'
/>
);
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function ConfigVersionsPage() {
return (
<ModulePageSkeleton
title='配置版本'
description='阶段 3 将在此接入版本列表、diff 预览、激活与回滚流程。'
/>
);
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function FilesPage() {
return (
<ModulePageSkeleton
title='文件管理'
description='阶段 4 将在此接入文件列表、下载与管理交互。'
/>
);
}
@@ -0,0 +1,11 @@
import type { ReactNode } from 'react';
import { DashboardShell } from '@/components/layout/dashboard-shell';
interface DashboardLayoutProps {
children: ReactNode;
}
export default function DashboardLayout({ children }: DashboardLayoutProps) {
return <DashboardShell>{children}</DashboardShell>;
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function ManagedDomainsPage() {
return (
<ModulePageSkeleton
title='域名管理'
description='阶段 3 将在此接入域名列表、证书绑定状态与启用切换。'
/>
);
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function NodesPage() {
return (
<ModulePageSkeleton
title='节点管理'
description='阶段 3 将在此接入节点状态标签、部署命令、心跳与更新动作。'
/>
);
}
+14
View File
@@ -0,0 +1,14 @@
import { DashboardOverview } from '@/features/dashboard/components/dashboard-overview';
import { PageHeader } from '@/components/layout/page-header';
export default function DashboardPage() {
return (
<div className='space-y-6'>
<PageHeader
title='ATSFlare 管理端工程初始化'
description='新版前端已切换到 Next.js 工程骨架,当前页面用于展示阶段 1 交付结果与模块入口。'
/>
<DashboardOverview />
</div>
);
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function ProxyRoutesPage() {
return (
<ModulePageSkeleton
title='反代规则'
description='阶段 3 将在此接入规则列表、创建编辑抽屉与发布动作。'
/>
);
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function SettingsPage() {
return (
<ModulePageSkeleton
title='设置'
description='阶段 4 将在此接入系统设置、运维设置与个人设置重组。'
/>
);
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function TlsCertificatesPage() {
return (
<ModulePageSkeleton
title='TLS 证书'
description='阶段 3 将在此接入证书上传、导入与有效期展示。'
/>
);
}
@@ -0,0 +1,10 @@
import { ModulePageSkeleton } from '@/features/shared/components/module-page-skeleton';
export default function UsersPage() {
return (
<ModulePageSkeleton
title='用户管理'
description='阶段 4 将在此接入用户列表、角色管理与搜索体验。'
/>
);
}
+11
View File
@@ -0,0 +1,11 @@
import type { ReactNode } from 'react';
import { PublicShell } from '@/components/layout/public-shell';
interface PublicLayoutProps {
children: ReactNode;
}
export default function PublicLayout({ children }: PublicLayoutProps) {
return <PublicShell>{children}</PublicShell>;
}
@@ -0,0 +1,10 @@
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
export default function LoginPage() {
return (
<PublicRoutePlaceholder
title='登录页占位'
description='阶段 2 将在此接入真实登录表单、Session 兼容与登录后跳转。'
/>
);
}
@@ -0,0 +1,10 @@
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
export default function GithubOAuthPage() {
return (
<PublicRoutePlaceholder
title='GitHub OAuth 回调占位'
description='阶段 2 将在此接入授权回调处理、状态提示与跳转逻辑。'
/>
);
}
@@ -0,0 +1,10 @@
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
export default function RegisterPage() {
return (
<PublicRoutePlaceholder
title='注册页占位'
description='阶段 2 将在此接入注册表单、字段校验与提交流程。'
/>
);
}
@@ -0,0 +1,10 @@
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
export default function ResetPasswordPage() {
return (
<PublicRoutePlaceholder
title='重置密码页占位'
description='阶段 2 将在此接入找回密码与重置流程。'
/>
);
}
+35
View File
@@ -0,0 +1,35 @@
@import '../styles/tokens.css';
@import 'tailwindcss';
* {
box-sizing: border-box;
}
html {
color-scheme: dark;
}
body {
min-height: 100vh;
background:
radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 30%),
linear-gradient(180deg, rgba(8, 17, 31, 0.98), rgba(8, 17, 31, 1));
color: var(--foreground-primary);
font-family:
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
sans-serif;
}
a {
color: inherit;
text-decoration: none;
}
button {
cursor: pointer;
}
::selection {
background: rgba(56, 189, 248, 0.32);
color: #f8fafc;
}
+29
View File
@@ -0,0 +1,29 @@
import type { Metadata } from 'next';
import type { ReactNode } from 'react';
import { AppProviders } from '@/components/providers/app-providers';
import './globals.css';
export const metadata: Metadata = {
title: {
default: 'ATSFlare 控制台',
template: '%s | ATSFlare',
},
description: 'ATSFlare 管理端新版工程骨架',
applicationName: 'ATSFlare',
};
interface RootLayoutProps {
children: ReactNode;
}
export default function RootLayout({ children }: RootLayoutProps) {
return (
<html lang='zh-CN' suppressHydrationWarning>
<body>
<AppProviders>{children}</AppProviders>
</body>
</html>
);
}
+18
View File
@@ -0,0 +1,18 @@
import Link from 'next/link';
import { AppCard } from '@/components/ui/app-card';
export default function NotFound() {
return (
<main className='flex min-h-screen items-center justify-center px-4'>
<AppCard title='页面不存在' description='当前请求的页面尚未接入新版管理端路由。'>
<div className='space-y-4 text-sm leading-6 text-[var(--foreground-secondary)]'>
<p>请返回总览页,或继续通过侧边导航访问已初始化的模块入口。</p>
<Link href='/' className='inline-flex rounded-full bg-sky-400 px-4 py-2 font-medium text-slate-950 transition hover:bg-sky-300'>
返回总览
</Link>
</div>
</AppCard>
</main>
);
}