diff --git a/.gitignore b/.gitignore index 7ce768a..1560038 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,7 @@ backend/uploads/ .idea/ *.swp *.swo + +# Vibe Coding +.memsearch +/frontend/.memsearch diff --git a/frontend/src/pages/ClientManagement.jsx b/frontend/src/pages/ClientManagement.jsx index cf04371..0b19faf 100644 --- a/frontend/src/pages/ClientManagement.jsx +++ b/frontend/src/pages/ClientManagement.jsx @@ -4,7 +4,7 @@ import { Button, Input, Space, - Modal, + Drawer, Form, Select, App, @@ -34,11 +34,11 @@ import { CloudUploadOutlined, CheckCircleOutlined, RocketOutlined, + SaveOutlined, } from '@ant-design/icons'; import apiClient from '../utils/apiClient'; import { buildApiUrl, API_ENDPOINTS } from '../config/api'; import AdminModuleShell from '../components/AdminModuleShell'; -import StatusTag from '../components/StatusTag'; const { Text } = Typography; const { TextArea } = Input; @@ -65,7 +65,7 @@ const ClientManagement = () => { const [clients, setClients] = useState([]); const [loading, setLoading] = useState(true); - const [showModal, setShowModal] = useState(false); + const [showDrawer, setShowDrawer] = useState(false); const [isEditing, setIsEditing] = useState(false); const [selectedClient, setSelectedClient] = useState(null); const [searchQuery, setSearchQuery] = useState(''); @@ -136,7 +136,7 @@ const ClientManagement = () => { is_latest: false, }); } - setShowModal(true); + setShowDrawer(true); }; const handleSave = async () => { @@ -166,7 +166,7 @@ const ClientManagement = () => { message.success('版本创建成功'); } - setShowModal(false); + setShowDrawer(false); fetchClients(); } catch (error) { if (!error?.errorFields) { @@ -336,20 +336,16 @@ const ClientManagement = () => { { title: '发布状态', key: 'status', - width: 170, + width: 140, render: (_, record) => ( handleToggleActive(record, checked)} /> - - - {isTruthy(record.is_latest) ? : } - + {isTruthy(record.is_latest) ? : } ), }, @@ -368,13 +364,13 @@ const ClientManagement = () => { render: (_, record) => ( - + )} @@ -462,13 +458,20 @@ const ClientManagement = () => { - setShowModal(false)} - onOk={handleSave} - width={720} - destroyOnHidden + placement="right" + width={760} + onClose={() => setShowDrawer(false)} + destroyOnClose + extra={( + + + + )} >
@@ -550,7 +553,7 @@ const ClientManagement = () => { -
+ ); }; diff --git a/frontend/src/pages/PromptManagementPage.jsx b/frontend/src/pages/PromptManagementPage.jsx index 10bb090..62f7301 100644 --- a/frontend/src/pages/PromptManagementPage.jsx +++ b/frontend/src/pages/PromptManagementPage.jsx @@ -13,7 +13,6 @@ import { Segmented, Select, Space, - Switch, Tag, Tooltip, Typography, diff --git a/frontend/src/pages/admin/ExternalAppManagement.jsx b/frontend/src/pages/admin/ExternalAppManagement.jsx index 713a44b..b0e1523 100644 --- a/frontend/src/pages/admin/ExternalAppManagement.jsx +++ b/frontend/src/pages/admin/ExternalAppManagement.jsx @@ -4,7 +4,7 @@ import { Button, Input, Space, - Modal, + Drawer, Form, Select, App, @@ -20,6 +20,7 @@ import { } from 'antd'; import { PlusOutlined, + SaveOutlined, DeleteOutlined, EditOutlined, SearchOutlined, @@ -37,7 +38,6 @@ import { import apiClient from '../../utils/apiClient'; import { buildApiUrl, API_ENDPOINTS } from '../../config/api'; import AdminModuleShell from '../../components/AdminModuleShell'; -import StatusTag from '../../components/StatusTag'; const { Text } = Typography; const { TextArea } = Input; @@ -76,7 +76,7 @@ const ExternalAppManagement = () => { const [apps, setApps] = useState([]); const [loading, setLoading] = useState(true); - const [showModal, setShowModal] = useState(false); + const [showDrawer, setShowDrawer] = useState(false); const [isEditing, setIsEditing] = useState(false); const [selectedApp, setSelectedApp] = useState(null); const [filterAppType, setFilterAppType] = useState('all'); @@ -122,7 +122,7 @@ const ExternalAppManagement = () => { app_info: {}, }); } - setShowModal(true); + setShowDrawer(true); }; const handleSave = async () => { @@ -142,7 +142,7 @@ const ExternalAppManagement = () => { message.success('应用创建成功'); } - setShowModal(false); + setShowDrawer(false); fetchApps(); } catch (error) { if (!error.errorFields) { @@ -308,16 +308,13 @@ const ExternalAppManagement = () => { { title: '状态', key: 'status', - width: 140, + width: 110, render: (_, record) => ( - - handleToggleStatus(record, checked)} - /> - - + handleToggleStatus(record, checked)} + /> ), }, { @@ -337,6 +334,7 @@ const ExternalAppManagement = () => { + )} @@ -430,13 +428,20 @@ const ExternalAppManagement = () => { - setShowModal(false)} - onOk={() => form.submit()} + placement="right" width={680} - destroyOnHidden + onClose={() => setShowDrawer(false)} + destroyOnClose + extra={( + + + + )} >
@@ -554,12 +559,12 @@ const ExternalAppManagement = () => { - + -
+ ); }; diff --git a/frontend/src/pages/admin/HotWordManagement.jsx b/frontend/src/pages/admin/HotWordManagement.jsx index 41cde20..7757d84 100644 --- a/frontend/src/pages/admin/HotWordManagement.jsx +++ b/frontend/src/pages/admin/HotWordManagement.jsx @@ -486,7 +486,7 @@ const HotWordManagement = () => { - + @@ -516,7 +516,7 @@ const HotWordManagement = () => { - + + )} >
@@ -452,7 +455,7 @@ const TerminalManagement = () => { - + @@ -461,7 +464,7 @@ const TerminalManagement = () => {