feat: Modify the color of the svg icon in the header according to the selected state and feat: extract routing information from the knowledge base into constants (#51)

* feat: Modify the color of the svg icon in the header according to the selected state

* feat: add translation icon to header

* feat: shorten the route length of the knowledge base

* feat: extract routing information from the knowledge base into constants
This commit is contained in:
balibabu
2024-02-02 09:35:21 +08:00
committed by GitHub
parent e6acaf6738
commit 503735cd1d
26 changed files with 439 additions and 130 deletions

View File

@ -1,7 +1,9 @@
import { KnowledgeRouteKey } from '@/constants/knowledge';
import { Button, Form, Input, Radio, Select, Space, Tag } from 'antd';
import React, { useCallback, useEffect, useState } from 'react';
import { useDispatch, useNavigate, useSelector } from 'umi';
import styles from './index.less';
const { CheckableTag } = Tag;
const layout = {
labelCol: { span: 8 },
@ -67,7 +69,7 @@ const KnowledgeSetting: React.FC<kSProps> = ({ kb_id }) => {
},
});
retcode === 0 &&
navigate(`/knowledge/add/setting?activeKey=file&id=${kb_id}`);
navigate(`/knowledge/${KnowledgeRouteKey.Dataset}?id=${kb_id}`);
}
} catch (error) {
console.warn(error);