feat: 添加声纹注册路由并优化用户菜单项
parent
c60db64578
commit
d554849e8e
|
|
@ -213,30 +213,9 @@ export default function AppLayout() {
|
|||
key: 'profile',
|
||||
label: <Link to="/profile">{t('layout.profile')}</Link>,
|
||||
icon: <UserOutlined />
|
||||
},
|
||||
{
|
||||
key: 'speaker',
|
||||
label: <Link to="/speaker-reg">声纹注册</Link>,
|
||||
icon: <AudioOutlined />
|
||||
}
|
||||
];
|
||||
|
||||
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: <Link to="/platform-settings">{t('layout.settings')}</Link>,
|
||||
icon: <SettingOutlined />
|
||||
});
|
||||
}
|
||||
|
||||
items.push({ type: 'divider', key: 'd1' });
|
||||
items.push({
|
||||
key: 'logout',
|
||||
|
|
@ -246,8 +225,7 @@ export default function AppLayout() {
|
|||
});
|
||||
|
||||
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') },
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import type { MenuRoute } from "../types";
|
|||
export const menuRoutes: MenuRoute[] = [
|
||||
{ path: "/", label: "总览", element: <Dashboard />, perm: "menu:dashboard" },
|
||||
{ path: "/profile", label: "个人中心", element: <Profile /> },
|
||||
{ path: "/speaker-reg", label: "声纹注册", element: <SpeakerReg />, perm: "menu:speaker" },
|
||||
{ path: "/tenants", label: "租户管理", element: <Tenants />, perm: "menu:tenants" },
|
||||
{ path: "/orgs", label: "组织管理", element: <Orgs />, perm: "menu:orgs" },
|
||||
{ path: "/users", label: "用户管理", element: <Users />, perm: "menu:users" },
|
||||
|
|
@ -45,7 +46,6 @@ export const menuRoutes: MenuRoute[] = [
|
|||
];
|
||||
|
||||
export const extraRoutes = [
|
||||
{ path: "/meetings/:id", element: <MeetingDetail />, perm: "menu:meeting" },
|
||||
{ path: "/speaker-reg", label: "声纹注册", element: <SpeakerReg /> }
|
||||
{ path: "/meetings/:id", element: <MeetingDetail />, perm: "menu:meeting" }
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue