mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-05 12:29:44 +08:00
refactor(OCR设置): 重命名OcrImageProviderSettings为OcrImageSettings并优化代码结构
This commit is contained in:
parent
63bb26cae6
commit
45d3550492
@ -8,9 +8,9 @@ import { useDispatch } from 'react-redux'
|
|||||||
|
|
||||||
import { SettingRow, SettingRowTitle } from '..'
|
import { SettingRow, SettingRowTitle } from '..'
|
||||||
|
|
||||||
const logger = loggerService.withContext('OcrImageProviderSettings')
|
const logger = loggerService.withContext('OcrImageSettings')
|
||||||
|
|
||||||
const OcrImageProviderSettings = () => {
|
const OcrImageSettings = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const providers = useAppSelector((state) => state.ocr.providers)
|
const providers = useAppSelector((state) => state.ocr.providers)
|
||||||
const imageProvider = useAppSelector((state) => state.ocr.imageProvider)
|
const imageProvider = useAppSelector((state) => state.ocr.imageProvider)
|
||||||
@ -48,4 +48,4 @@ const OcrImageProviderSettings = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default OcrImageProviderSettings
|
export default OcrImageSettings
|
||||||
@ -5,7 +5,7 @@ import { FC } from 'react'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
import { SettingDivider, SettingGroup, SettingTitle } from '..'
|
import { SettingDivider, SettingGroup, SettingTitle } from '..'
|
||||||
import OcrImageProviderSettings from './OcrImageProviderSettings'
|
import OcrImageSettings from './OcrImageSettings'
|
||||||
|
|
||||||
const OcrSettings: FC = () => {
|
const OcrSettings: FC = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@ -16,7 +16,7 @@ const OcrSettings: FC = () => {
|
|||||||
key: 'image',
|
key: 'image',
|
||||||
label: t('settings.tool.ocr.image.title'),
|
label: t('settings.tool.ocr.image.title'),
|
||||||
icon: <PictureOutlined />,
|
icon: <PictureOutlined />,
|
||||||
children: <OcrImageProviderSettings />
|
children: <OcrImageSettings />
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user