mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
refactor(settings): 重构文档预处理设置模块结构
将PreprocessSettings重命名为DocProcessSettings并调整文件结构 更新相关路由和组件引用以保持功能一致性
This commit is contained in:
parent
1da7492b42
commit
250dd53c97
@ -5,8 +5,8 @@ import { Select } from 'antd'
|
||||
import { FC, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { SettingContainer, SettingDivider, SettingGroup, SettingRow, SettingRowTitle, SettingTitle } from '..'
|
||||
import PreprocessProviderSettings from './PreprocessSettings'
|
||||
import { SettingDivider, SettingGroup, SettingRow, SettingRowTitle, SettingTitle } from '..'
|
||||
import PreprocessProviderSettings from './PreprocessProviderSettings'
|
||||
|
||||
const PreprocessSettings: FC = () => {
|
||||
const { preprocessProviders } = usePreprocessProviders()
|
||||
@ -25,7 +25,7 @@ const PreprocessSettings: FC = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<SettingContainer theme={themeMode}>
|
||||
<>
|
||||
<SettingGroup theme={themeMode}>
|
||||
<SettingTitle>{t('settings.tool.preprocess.title')}</SettingTitle>
|
||||
<SettingDivider />
|
||||
@ -52,7 +52,7 @@ const PreprocessSettings: FC = () => {
|
||||
<PreprocessProviderSettings provider={selectedProvider} />
|
||||
</SettingGroup>
|
||||
)}
|
||||
</SettingContainer>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default PreprocessSettings
|
||||
16
src/renderer/src/pages/settings/DocProcessSettings/index.tsx
Normal file
16
src/renderer/src/pages/settings/DocProcessSettings/index.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import { useTheme } from '@renderer/context/ThemeProvider'
|
||||
import { FC } from 'react'
|
||||
|
||||
import { SettingContainer } from '..'
|
||||
import PreprocessSettings from './PreprocessSettings'
|
||||
|
||||
const DocProcessSettings: FC = () => {
|
||||
const { theme: themeMode } = useTheme()
|
||||
|
||||
return (
|
||||
<SettingContainer theme={themeMode}>
|
||||
<PreprocessSettings />
|
||||
</SettingContainer>
|
||||
)
|
||||
}
|
||||
export default DocProcessSettings
|
||||
@ -26,10 +26,10 @@ import styled from 'styled-components'
|
||||
import AboutSettings from './AboutSettings'
|
||||
import DataSettings from './DataSettings/DataSettings'
|
||||
import DisplaySettings from './DisplaySettings/DisplaySettings'
|
||||
import DocProcessSettings from './DocProcessSettings'
|
||||
import GeneralSettings from './GeneralSettings'
|
||||
import MCPSettings from './MCPSettings'
|
||||
import MemorySettings from './MemorySettings'
|
||||
import PreprocessSettings from './PreprocessSettings'
|
||||
import ProvidersList from './ProviderSettings'
|
||||
import QuickAssistantSettings from './QuickAssistantSettings'
|
||||
import QuickPhraseSettings from './QuickPhraseSettings'
|
||||
@ -100,8 +100,8 @@ const SettingsPage: FC = () => {
|
||||
{t('memory.title')}
|
||||
</MenuItem>
|
||||
</MenuItemLink>
|
||||
<MenuItemLink to="/settings/preprocess">
|
||||
<MenuItem className={isRoute('/settings/preprocess')}>
|
||||
<MenuItemLink to="/settings/docprocess">
|
||||
<MenuItem className={isRoute('/settings/docprocess')}>
|
||||
<FileCode size={18} />
|
||||
{t('settings.tool.preprocess.title')}
|
||||
</MenuItem>
|
||||
@ -144,7 +144,7 @@ const SettingsPage: FC = () => {
|
||||
<Route path="provider" element={<ProvidersList />} />
|
||||
<Route path="model" element={<ModelSettings />} />
|
||||
<Route path="websearch" element={<WebSearchSettings />} />
|
||||
<Route path="preprocess" element={<PreprocessSettings />} />
|
||||
<Route path="docprocess" element={<DocProcessSettings />} />
|
||||
<Route path="quickphrase" element={<QuickPhraseSettings />} />
|
||||
<Route path="mcp/*" element={<MCPSettings />} />
|
||||
<Route path="memory" element={<MemorySettings />} />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user