You've already forked DataMate
feat(menu): 移除知识库功能入口和Webhook配置
- 从菜单中移除知识生成相关的BookOpen图标 - 删除知识库功能的导航项及其相关配置 - 移除Webhook配置页面和对应的菜单选项 - 简化设置页面的导入依赖和组件结构
This commit is contained in:
@@ -2,7 +2,6 @@ import {
|
|||||||
FolderOpen,
|
FolderOpen,
|
||||||
Tag,
|
Tag,
|
||||||
Target,
|
Target,
|
||||||
BookOpen,
|
|
||||||
Shuffle,
|
Shuffle,
|
||||||
BarChart3,
|
BarChart3,
|
||||||
MessageSquare,
|
MessageSquare,
|
||||||
@@ -70,13 +69,6 @@ export const menuItems = [
|
|||||||
description: "质量分析、性能评估和偏见检测",
|
description: "质量分析、性能评估和偏见检测",
|
||||||
color: "bg-indigo-500",
|
color: "bg-indigo-500",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "knowledge-base",
|
|
||||||
title: "知识生成",
|
|
||||||
icon: BookOpen,
|
|
||||||
description: "面向RAG的知识库构建",
|
|
||||||
color: "bg-teal-500",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "operator-market",
|
id: "operator-market",
|
||||||
title: "算子市场",
|
title: "算子市场",
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Button, Menu } from "antd";
|
import { Menu } from "antd";
|
||||||
import { SettingOutlined, ApiOutlined } from "@ant-design/icons";
|
import { SettingOutlined } from "@ant-design/icons";
|
||||||
import { Component, X } from "lucide-react";
|
import { Component } from "lucide-react";
|
||||||
import { useNavigate } from "react-router";
|
|
||||||
import SystemConfig from "./SystemConfig";
|
import SystemConfig from "./SystemConfig";
|
||||||
import ModelAccess from "./ModelAccess";
|
import ModelAccess from "./ModelAccess";
|
||||||
import WebhookConfig from "./WebhookConfig";
|
|
||||||
|
|
||||||
export default function SettingsPage() {
|
export default function SettingsPage() {
|
||||||
const navigate = useNavigate();
|
|
||||||
const [activeTab, setActiveTab] = useState("model-access");
|
const [activeTab, setActiveTab] = useState("model-access");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -32,13 +29,6 @@ export default function SettingsPage() {
|
|||||||
icon: <SettingOutlined />,
|
icon: <SettingOutlined />,
|
||||||
label: "参数配置",
|
label: "参数配置",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: "webhook-config",
|
|
||||||
icon: <ApiOutlined />,
|
|
||||||
label: "Webhook",
|
|
||||||
disabled: true,
|
|
||||||
title: "暂未开放"
|
|
||||||
},
|
|
||||||
]}
|
]}
|
||||||
selectedKeys={[activeTab]}
|
selectedKeys={[activeTab]}
|
||||||
onClick={({ key }) => {
|
onClick={({ key }) => {
|
||||||
@@ -51,7 +41,6 @@ export default function SettingsPage() {
|
|||||||
{/* 内容区域,根据 activeTab 渲染不同的组件 */}
|
{/* 内容区域,根据 activeTab 渲染不同的组件 */}
|
||||||
{activeTab === "system-config" && <SystemConfig />}
|
{activeTab === "system-config" && <SystemConfig />}
|
||||||
{activeTab === "model-access" && <ModelAccess />}
|
{activeTab === "model-access" && <ModelAccess />}
|
||||||
{activeTab === "webhook-config" && <WebhookConfig />}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user