mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-05 23:26:38 +08:00
[优化] 改名
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { AccessLogsPage } from '@/features/access-logs/components/access-logs-page';
|
||||
|
||||
export default function AccessLogsRoute() {
|
||||
return <AccessLogsPage />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ApplyLogsPage as ApplyLogsFeaturePage } from '@/features/apply-logs/components/apply-logs-page';
|
||||
|
||||
export default function ApplyLogsPage() {
|
||||
return <ApplyLogsFeaturePage />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ConfigVersionsPage } from '@/features/config-versions/components/config-versions-page';
|
||||
|
||||
export default function ConfigVersionsRoute() {
|
||||
return <ConfigVersionsPage />;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
import { DashboardShell } from '@/components/layout/dashboard-shell';
|
||||
import { DashboardAuthGuard } from '@/features/auth/components/dashboard-auth-guard';
|
||||
|
||||
interface DashboardLayoutProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default function DashboardLayout({ children }: DashboardLayoutProps) {
|
||||
return (
|
||||
<DashboardAuthGuard>
|
||||
<DashboardShell>{children}</DashboardShell>
|
||||
</DashboardAuthGuard>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
import { NodeDetailPage } from '@/features/nodes/components/node-detail-page';
|
||||
|
||||
export default function NodeDetailRoute() {
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
return <NodeDetailPage nodeId={searchParams.get('id') ?? ''} />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { NodesPage } from '@/features/nodes/components/nodes-page';
|
||||
|
||||
export default function NodesRoute() {
|
||||
return <NodesPage />;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { DashboardOverview } from '@/features/dashboard/components/dashboard-overview';
|
||||
|
||||
export default function DashboardPage() {
|
||||
return (
|
||||
<div className='space-y-6'>
|
||||
<DashboardOverview />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { PerformancePage } from '@/features/performance/components/performance-page';
|
||||
|
||||
export default function PerformanceRoute() {
|
||||
return <PerformancePage />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ProxyRoutesPage } from '@/features/proxy-routes/components/proxy-routes-page';
|
||||
|
||||
export default function ProxyRoutesRoute() {
|
||||
return <ProxyRoutesPage />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { SettingsPage } from '@/features/settings/components/settings-page';
|
||||
|
||||
export default function SettingsRoute() {
|
||||
return <SettingsPage />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { UsersPage } from '@/features/users/components/users-page';
|
||||
|
||||
export default function UsersRoute() {
|
||||
return <UsersPage />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TlsCertificatesPage } from '@/features/tls-certificates/components/tls-certificates-page';
|
||||
|
||||
export default function WebsiteCertificateRoute() {
|
||||
return <TlsCertificatesPage />;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
import { WebsiteDetailPage } from '@/features/websites/components/website-detail-page';
|
||||
|
||||
export default function WebsiteDetailRoute() {
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
return <WebsiteDetailPage websiteId={searchParams.get('id') ?? ''} />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { WebsitesPage } from '@/features/websites/components/websites-page';
|
||||
|
||||
export default function WebsiteRoute() {
|
||||
return <WebsitesPage />;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { AboutPage } from '@/features/about/components/about-page';
|
||||
|
||||
export default function AboutRoute() {
|
||||
return <AboutPage />;
|
||||
}
|
||||
@@ -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,12 @@
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { LoginForm } from '@/features/auth/components/login-form';
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<LoginForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { GitHubOAuthCallback } from '@/features/auth/components/github-oauth-callback';
|
||||
|
||||
export default function GithubOAuthPage() {
|
||||
return (
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<GitHubOAuthCallback />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { RegisterForm } from '@/features/auth/components/register-form';
|
||||
|
||||
export default function RegisterPage() {
|
||||
return (
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<RegisterForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { PasswordResetFlow } from '@/features/auth/components/password-reset-flow';
|
||||
|
||||
export default function ResetPasswordPage() {
|
||||
return (
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<PasswordResetFlow />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { PasswordResetFlow } from '@/features/auth/components/password-reset-flow';
|
||||
|
||||
export default function LegacyResetPasswordPage() {
|
||||
return (
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<PasswordResetFlow />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
@import '../styles/tokens.css';
|
||||
@import 'tailwindcss';
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
background: var(--surface-canvas);
|
||||
}
|
||||
|
||||
html[data-theme='light'] {
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] {
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
background: var(--body-background);
|
||||
color: var(--foreground-primary);
|
||||
font-family:
|
||||
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
||||
sans-serif;
|
||||
transition:
|
||||
background 0.2s ease,
|
||||
color 0.2s ease;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: var(--selection-background);
|
||||
color: var(--selection-foreground);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Metadata } from 'next';
|
||||
import Script from 'next/script';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
import { AppProviders } from '@/components/providers/app-providers';
|
||||
import { getThemeInitScript } from '@/lib/theme/theme';
|
||||
|
||||
import './globals.css';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
default: 'OpenFlare 控制台',
|
||||
template: '%s | OpenFlare',
|
||||
},
|
||||
description: 'OpenFlare 管理端新版工程骨架',
|
||||
applicationName: 'OpenFlare',
|
||||
};
|
||||
|
||||
interface RootLayoutProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default function RootLayout({ children }: RootLayoutProps) {
|
||||
return (
|
||||
<html lang='zh-CN' suppressHydrationWarning>
|
||||
<body>
|
||||
<Script id='theme-init' strategy='beforeInteractive'>
|
||||
{getThemeInitScript()}
|
||||
</Script>
|
||||
<AppProviders>{children}</AppProviders>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -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-[var(--brand-primary)] px-4 py-2 font-medium text-[var(--foreground-inverse)] transition hover:opacity-90'>
|
||||
返回总览
|
||||
</Link>
|
||||
</div>
|
||||
</AppCard>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user