mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 16:46:37 +08:00
[重构] 前端改造v2
This commit is contained in:
@@ -1,11 +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 <DashboardShell>{children}</DashboardShell>;
|
||||
return (
|
||||
<DashboardAuthGuard>
|
||||
<DashboardShell>{children}</DashboardShell>
|
||||
</DashboardAuthGuard>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { LoginForm } from '@/features/auth/components/login-form';
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
<PublicRoutePlaceholder
|
||||
title='登录页占位'
|
||||
description='阶段 2 将在此接入真实登录表单、Session 兼容与登录后跳转。'
|
||||
/>
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<LoginForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
|
||||
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 (
|
||||
<PublicRoutePlaceholder
|
||||
title='GitHub OAuth 回调占位'
|
||||
description='阶段 2 将在此接入授权回调处理、状态提示与跳转逻辑。'
|
||||
/>
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<GitHubOAuthCallback />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { RegisterForm } from '@/features/auth/components/register-form';
|
||||
|
||||
export default function RegisterPage() {
|
||||
return (
|
||||
<PublicRoutePlaceholder
|
||||
title='注册页占位'
|
||||
description='阶段 2 将在此接入注册表单、字段校验与提交流程。'
|
||||
/>
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<RegisterForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { PublicRoutePlaceholder } from '@/features/auth/components/public-route-placeholder';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { PasswordResetRequestForm } from '@/features/auth/components/password-reset-request-form';
|
||||
|
||||
export default function ResetPasswordPage() {
|
||||
return (
|
||||
<PublicRoutePlaceholder
|
||||
title='重置密码页占位'
|
||||
description='阶段 2 将在此接入找回密码与重置流程。'
|
||||
/>
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<PasswordResetRequestForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
import { PasswordResetConfirmForm } from '@/features/auth/components/password-reset-confirm-form';
|
||||
|
||||
export default function LegacyResetPasswordPage() {
|
||||
return (
|
||||
<Suspense fallback={<LoadingState />}>
|
||||
<PasswordResetConfirmForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user