第一次提交
This commit is contained in:
13
app-instance/frontend/app/(auth)/layout.tsx
Normal file
13
app-instance/frontend/app/(auth)/layout.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import AuthGuard from '@/components/AuthGuard';
|
||||
|
||||
export default function AuthLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<AuthGuard minHeightClassName="min-h-screen">
|
||||
<main className="min-h-screen bg-background text-foreground">{children}</main>
|
||||
</AuthGuard>
|
||||
);
|
||||
}
|
||||
21
app-instance/frontend/app/(auth)/login/page.tsx
Normal file
21
app-instance/frontend/app/(auth)/login/page.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
import { buildAuthPortalUrl } from '@/lib/auth-portal';
|
||||
|
||||
export default function LoginRedirectPage() {
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
useEffect(() => {
|
||||
const nextPath = searchParams?.get('next') || '/';
|
||||
window.location.replace(buildAuthPortalUrl('/login', nextPath));
|
||||
}, [searchParams]);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center px-4">
|
||||
<div className="text-sm text-muted-foreground">正在跳转到登录门户...</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
21
app-instance/frontend/app/(auth)/register/page.tsx
Normal file
21
app-instance/frontend/app/(auth)/register/page.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
import { buildAuthPortalUrl } from '@/lib/auth-portal';
|
||||
|
||||
export default function RegisterRedirectPage() {
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
useEffect(() => {
|
||||
const nextPath = searchParams?.get('next') || '/mcp';
|
||||
window.location.replace(buildAuthPortalUrl('/register', nextPath));
|
||||
}, [searchParams]);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center px-4">
|
||||
<div className="text-sm text-muted-foreground">正在跳转到注册门户...</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user