1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| import { SidebarMenu } from "../../components/SidebarMenu/SidebarMenu";
| import { WebhookPage } from "../WebhookPage/WebhookPage";
| import { DangerZone } from "./DangerZone";
| import { GeneralSettings } from "./GeneralSettings";
| import { AnnotationSettings } from "./AnnotationSettings";
| import { LabelingSettings } from "./LabelingSettings";
| import { MachineLearningSettings } from "./MachineLearningSettings/MachineLearningSettings";
| import { PredictionsSettings } from "./PredictionsSettings/PredictionsSettings";
| import { StorageSettings } from "./StorageSettings/StorageSettings";
| import "./settings.scss";
|
| export const MenuLayout = ({ children, ...routeProps }) => {
| return (
| <SidebarMenu
| menuItems={[
| GeneralSettings,
| LabelingSettings,
| AnnotationSettings,
| MachineLearningSettings,
| PredictionsSettings,
| StorageSettings,
| WebhookPage,
| DangerZone,
| ].filter(Boolean)}
| path={routeProps.match.url}
| children={children}
| />
| );
| };
|
| const pages = {
| AnnotationSettings,
| LabelingSettings,
| MachineLearningSettings,
| PredictionsSettings,
| StorageSettings,
| WebhookPage,
| DangerZone,
| };
|
| export const SettingsPage = {
| title: "设置",
| path: "/settings",
| exact: true,
| layout: MenuLayout,
| component: GeneralSettings,
| pages,
| };
|
|