Files
labelmain/components/layout/common.ts
2026-04-15 17:09:49 +08:00

121 lines
2.5 KiB
TypeScript

export interface MenuItem {
url: string
title: string
icon?: string
isActive?: boolean
items?: MenuItem[]
}
export const withoutLayoutRoutes = ["/login"]
export const subConfigList: { source: string; url: string }[] =
process.env.NEXT_PUBLIC_ENV === "development"
? [
{
source: "/image",
url: "http://localhost:5532",
},
{
source: "/video",
url: "http://localhost:5533",
},
{
source: "/lidar",
url: "http://localhost:5534",
},
{
source: "/mgt",
url: "http://localhost:5535",
},
]
: process.env.NEXT_PUBLIC_ENV === "staging"
? [
{
source: "/image",
url: "http://172.16.115.128:5532",
},
{
source: "/video",
url: "http://172.16.115.128:5533",
},
{
source: "/lidar",
url: "http://172.16.115.128:5534",
},
{
source: "/mgt",
url: "http://172.16.115.128:5535",
},
]
: [
{
source: "/image",
url: "https://label.cowarobot.com",
},
{
source: "/video",
url: "https://label.cowarobot.com",
},
{
source: "/lidar",
url: "https://label.cowarobot.com",
},
{
source: "/mgt",
url: "https://label.cowarobot.com",
},
]
const currentComponentList: MenuItem[] = [
{
title: "个人中心",
url: "person",
icon: "PersonalCenterIcon",
items: [
{
title: "个人看板",
url: "dashboard",
icon: "DashboardIcon",
},
{
title: "个人日报",
url: "report",
icon: "ReportIcon",
},
],
},
]
const lidarList: MenuItem[] =
process.env.NEXT_PUBLIC_ENV === "production"
? []
: [
{
title: "点云标注",
url: "lidar",
icon: "LidarAnnotationIcon",
},
]
export const componentList: MenuItem[] = [
...currentComponentList,
{
title: "图片标注",
url: "image",
icon: "ImageAnnotationIcon",
},
{
title: "视频标注",
url: "video",
icon: "VideoAnnotationIcon",
},
...lidarList,
{
title: "管理中心",
url: "mgt",
icon: "ManagementCenterIcon",
},
]
export const showList: MenuItem[] = []