diff --git a/frontend/src/layouts/AppLayout.tsx b/frontend/src/layouts/AppLayout.tsx index 220990d..140743a 100644 --- a/frontend/src/layouts/AppLayout.tsx +++ b/frontend/src/layouts/AppLayout.tsx @@ -209,45 +209,23 @@ export default function AppLayout() { const userMenuItems: MenuProps["items"] = useMemo(() => { const items: any[] = [ - { - key: 'profile', - label: {t('layout.profile')}, - icon: - }, { - key: 'speaker', - label: 声纹注册, - icon: + key: 'profile', + label: {t('layout.profile')}, + icon: } ]; - let profile: any = {}; - try { - const stored = sessionStorage.getItem("userProfile"); - if (stored) profile = JSON.parse(stored) || {}; - } catch (e) { - profile = {}; - } - - if (profile.isPlatformAdmin || can("sys_platform:config:update")) { - items.push({ - key: 'settings', - label: {t('layout.settings')}, - icon: - }); - } - items.push({ type: 'divider', key: 'd1' }); - items.push({ - key: 'logout', - label: t('layout.logout'), - icon: , - onClick: handleLogout + items.push({ + key: 'logout', + label: t('layout.logout'), + icon: , + onClick: handleLogout }); return items; - }, [t, can, handleLogout]); - + }, [t, handleLogout]); const langMenuItems: MenuProps["items"] = [ { key: 'zh-CN', label: '简体中文', onClick: () => changeLanguage('zh-CN') }, { key: 'en-US', label: 'English', onClick: () => changeLanguage('en-US') }, diff --git a/frontend/src/routes/routes.tsx b/frontend/src/routes/routes.tsx index 99d39e4..f91443f 100644 --- a/frontend/src/routes/routes.tsx +++ b/frontend/src/routes/routes.tsx @@ -25,6 +25,7 @@ import type { MenuRoute } from "../types"; export const menuRoutes: MenuRoute[] = [ { path: "/", label: "总览", element: , perm: "menu:dashboard" }, { path: "/profile", label: "个人中心", element: }, + { path: "/speaker-reg", label: "声纹注册", element: , perm: "menu:speaker" }, { path: "/tenants", label: "租户管理", element: , perm: "menu:tenants" }, { path: "/orgs", label: "组织管理", element: , perm: "menu:orgs" }, { path: "/users", label: "用户管理", element: , perm: "menu:users" }, @@ -45,7 +46,6 @@ export const menuRoutes: MenuRoute[] = [ ]; export const extraRoutes = [ - { path: "/meetings/:id", element: , perm: "menu:meeting" }, - { path: "/speaker-reg", label: "声纹注册", element: } + { path: "/meetings/:id", element: , perm: "menu:meeting" } ];