feat: complete login and user management flow

This commit is contained in:
hectorzhao
2026-07-02 16:28:48 +08:00
parent 9c639d54b9
commit e26d8324c3
22 changed files with 1320 additions and 300 deletions
+9 -1
View File
@@ -24,15 +24,23 @@ import {
Users,
UserX,
} from 'lucide-react';
import { Navigate } from 'react-router-dom';
import { readSession } from '@/api/session';
import { AppShell } from '@/layouts/AppShell';
export function AdminLayout() {
const session = readSession();
if (session?.portal !== 'admin') {
return <Navigate to="/admin/login" replace />;
}
return (
<AppShell
title="CMPP 运营端"
subtitle="平台运营管理中心"
workspaceName="平台运营工作区"
userName="运营"
loginPath="/admin/login"
userName={session.user.displayName}
userRole="平台管理员"
auditNotifications={[
{ label: '企业认证审核', count: 3, to: '/admin/enterprise-audit' },