Commit 5aa67994 by 1808837298@qq.com

refactor: Reorganize sidebar navigation and add personal settings route

parent 783c60ee
...@@ -30,6 +30,7 @@ import { useTranslation } from 'react-i18next'; ...@@ -30,6 +30,7 @@ import { useTranslation } from 'react-i18next';
import { StatusContext } from './context/Status'; import { StatusContext } from './context/Status';
import { setStatusData } from './helpers/data.js'; import { setStatusData } from './helpers/data.js';
import { API, showError } from './helpers'; import { API, showError } from './helpers';
import PersonalSetting from './components/PersonalSetting.js';
const Home = lazy(() => import('./pages/Home')); const Home = lazy(() => import('./pages/Home'));
const Detail = lazy(() => import('./pages/Detail')); const Detail = lazy(() => import('./pages/Detail'));
...@@ -178,6 +179,16 @@ function App() { ...@@ -178,6 +179,16 @@ function App() {
} }
/> />
<Route <Route
path='/personal'
element={
<PrivateRoute>
<Suspense fallback={<Loading></Loading>}>
<PersonalSetting />
</Suspense>
</PrivateRoute>
}
/>
<Route
path='/topup' path='/topup'
element={ element={
<PrivateRoute> <PrivateRoute>
......
...@@ -393,7 +393,7 @@ const PersonalSetting = () => { ...@@ -393,7 +393,7 @@ const PersonalSetting = () => {
</div> </div>
</div> </div>
</Modal> </Modal>
<div style={{marginTop: 20}}> <div>
<Card <Card
title={ title={
<Card.Meta <Card.Meta
......
...@@ -621,6 +621,7 @@ ...@@ -621,6 +621,7 @@
"窗口等待": "window wait", "窗口等待": "window wait",
"失败": "Failed", "失败": "Failed",
"绘图": "Drawing", "绘图": "Drawing",
"绘图日志": "Drawing log",
"放大": "Upscalers", "放大": "Upscalers",
"微妙放大": "Upscale (Subtle)", "微妙放大": "Upscale (Subtle)",
"创造放大": "Upscale (Creative)", "创造放大": "Upscale (Creative)",
...@@ -1120,7 +1121,7 @@ ...@@ -1120,7 +1121,7 @@
"知识库 ID": "Knowledge Base ID", "知识库 ID": "Knowledge Base ID",
"请输入知识库 ID,例如:123456": "Please enter knowledge base ID, e.g.: 123456", "请输入知识库 ID,例如:123456": "Please enter knowledge base ID, e.g.: 123456",
"可选值": "Optional value", "可选值": "Optional value",
"异步任务": "Async task", "任务日志": "Task log",
"你好": "Hello", "你好": "Hello",
"你好,请问有什么可以帮助您的吗?": "Hello, how may I help you?", "你好,请问有什么可以帮助您的吗?": "Hello, how may I help you?",
"用户分组": "Your default group", "用户分组": "Your default group",
...@@ -1335,5 +1336,7 @@ ...@@ -1335,5 +1336,7 @@
"Claude思考适配 BudgetTokens = MaxTokens * BudgetTokens 百分比": "Claude thinking adaptation BudgetTokens = MaxTokens * BudgetTokens percentage", "Claude思考适配 BudgetTokens = MaxTokens * BudgetTokens 百分比": "Claude thinking adaptation BudgetTokens = MaxTokens * BudgetTokens percentage",
"思考适配 BudgetTokens 百分比": "Thinking adaptation BudgetTokens percentage", "思考适配 BudgetTokens 百分比": "Thinking adaptation BudgetTokens percentage",
"0.1-1之间的小数": "Decimal between 0.1 and 1", "0.1-1之间的小数": "Decimal between 0.1 and 1",
"模型相关设置": "Model related settings" "模型相关设置": "Model related settings",
"收起侧边栏": "Collapse sidebar",
"展开侧边栏": "Expand sidebar"
} }
...@@ -18,6 +18,8 @@ const CLAUDE_HEADER = { ...@@ -18,6 +18,8 @@ const CLAUDE_HEADER = {
const CLAUDE_DEFAULT_MAX_TOKENS = { const CLAUDE_DEFAULT_MAX_TOKENS = {
'default': 8192, 'default': 8192,
"claude-3-haiku-20240307": 4096,
"claude-3-opus-20240229": 4096,
'claude-3-7-sonnet-20250219-thinking': 8192, 'claude-3-7-sonnet-20250219-thinking': 8192,
} }
......
...@@ -18,9 +18,6 @@ const Setting = () => { ...@@ -18,9 +18,6 @@ const Setting = () => {
const [tabActiveKey, setTabActiveKey] = useState('1'); const [tabActiveKey, setTabActiveKey] = useState('1');
let panes = [ let panes = [
{ {
tab: t('个人设置'),
content: <PersonalSetting />,
itemKey: 'personal',
}, },
]; ];
...@@ -61,7 +58,7 @@ const Setting = () => { ...@@ -61,7 +58,7 @@ const Setting = () => {
if (tab) { if (tab) {
setTabActiveKey(tab); setTabActiveKey(tab);
} else { } else {
onChangeTab('personal'); onChangeTab('operation');
} }
}, [location.search]); }, [location.search]);
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment