From d554849e8e467a56aebf639fd11cdc651b7b44e6 Mon Sep 17 00:00:00 2001 From: chenhao Date: Fri, 6 Mar 2026 15:27:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=A3=B0=E7=BA=B9?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E8=B7=AF=E7=94=B1=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=8F=9C=E5=8D=95=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layouts/AppLayout.tsx | 40 +++++++----------------------- frontend/src/routes/routes.tsx | 4 +-- 2 files changed, 11 insertions(+), 33 deletions(-) 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" } ];