feat:添加管理员登录
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import { AdminShell } from "@/components/admin/admin-shell";
|
||||
import { AdminShellAuthGate } from "@/components/admin/admin-shell-auth-gate";
|
||||
|
||||
export default function AdminShellLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return <AdminShell>{children}</AdminShell>;
|
||||
return (
|
||||
<AdminShellAuthGate>
|
||||
<AdminShell>{children}</AdminShell>
|
||||
</AdminShellAuthGate>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ModuleScaffold } from "@/components/admin/module-scaffold";
|
||||
import { getAdminPing } from "@/lib/admin-http";
|
||||
import { getAdminPing } from "@/api";
|
||||
import { dashboardModuleMeta } from "@/modules/dashboard/meta";
|
||||
import type { Metadata } from "next";
|
||||
|
||||
|
||||
@@ -1,32 +1,12 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { authModuleMeta } from "@/modules/auth/meta";
|
||||
import type { Metadata } from "next";
|
||||
|
||||
import { AdminLoginForm } from "@/components/admin/admin-login-form";
|
||||
import { authModuleMeta } from "@/modules/auth/meta";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: authModuleMeta.title,
|
||||
};
|
||||
|
||||
export default function AdminLoginPage() {
|
||||
return (
|
||||
<div className="flex min-h-full flex-1 flex-col items-center justify-center px-4 py-16">
|
||||
<div className="w-full max-w-md rounded-2xl border border-black/10 bg-white p-8 shadow-sm dark:border-white/10 dark:bg-zinc-900">
|
||||
<h1 className="text-xl font-semibold text-foreground">
|
||||
{authModuleMeta.title}
|
||||
</h1>
|
||||
<p className="mt-2 text-sm text-zinc-600 dark:text-zinc-400">
|
||||
{authModuleMeta.description}
|
||||
</p>
|
||||
<p className="mt-6 text-sm text-zinc-500 dark:text-zinc-400">
|
||||
接入管理端鉴权后,在此放置表单与回调;当前为路由占位。
|
||||
</p>
|
||||
<Link
|
||||
href="/admin"
|
||||
className="mt-8 inline-flex text-sm font-medium text-foreground underline-offset-4 hover:underline"
|
||||
>
|
||||
返回工作台
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return <AdminLoginForm />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user