refactor(auth): 移除用户登出功能并优化导航组件
- 从 app-top-nav.tsx 中移除登出相关代码和 LogOut 图标 - 从 canvas-client-page.tsx 中移除用户信息显示和登出回调函数 - 从 admin layout.tsx 中移除登出菜单项 - 将 navigation-tools 从 lib 目录迁移到 constant 目录 - 更新 UserStatusActions 组件以简化用户菜单逻辑 - 在用户状态操作组件中集成快捷键功能和管理员入口
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import { FileTextOutlined, HomeOutlined, LogoutOutlined, PictureOutlined, SettingOutlined } from "@ant-design/icons";
|
||||
import { Button, Flex, Layout, Menu, Typography, theme } from "antd";
|
||||
import { LogOut } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import type { ReactNode } from "react";
|
||||
@@ -70,10 +69,7 @@ export default function AdminLayout({ children }: { children: ReactNode }) {
|
||||
<Layout.Header style={{ display: "flex", alignItems: "center", justifyContent: "space-between", height: adminLayoutStyle.headerHeight, padding: "0 24px", background: antToken.colorBgContainer, borderBottom: `1px solid ${antToken.colorBorder}` }}>
|
||||
<Typography.Title level={5} style={{ margin: 0 }}>{pageTitle}</Typography.Title>
|
||||
<Flex align="center" gap={4}>
|
||||
<UserStatusActions
|
||||
showConfig={false}
|
||||
menuItems={[{ key: "logout", icon: <LogOut className="size-4" />, label: "退出登录", onClick: logout }]}
|
||||
/>
|
||||
<UserStatusActions showConfig={false} />
|
||||
</Flex>
|
||||
</Layout.Header>
|
||||
<Layout.Content style={{ minHeight: 0, overflow: "auto" }}>{children}</Layout.Content>
|
||||
|
||||
Reference in New Issue
Block a user