forked from infiniflow/ragflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add component DeepL infiniflow#1739
- Loading branch information
Showing
10 changed files
with
173 additions
and
7 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { useTranslate } from '@/hooks/common-hooks'; | ||
import { Form, InputNumber, Select } from 'antd'; | ||
import { DeepLSourceLangOptions, DeepLTargetLangOptions } from '../constant'; | ||
import { useBuildSortOptions } from '../form-hooks'; | ||
import { IOperatorForm } from '../interface'; | ||
|
||
const DeepLForm = ({ onValuesChange, form }: IOperatorForm) => { | ||
const { t } = useTranslate('flow'); | ||
const options = useBuildSortOptions(); | ||
|
||
return ( | ||
<Form | ||
name="basic" | ||
labelCol={{ span: 8 }} | ||
wrapperCol={{ span: 16 }} | ||
autoComplete="off" | ||
form={form} | ||
onValuesChange={onValuesChange} | ||
> | ||
<Form.Item label={t('text')} name={'text'}> | ||
<InputNumber></InputNumber> | ||
</Form.Item> | ||
<Form.Item label={t('authKey')} name={'auth_key'}> | ||
<Select options={options}></Select> | ||
</Form.Item> | ||
<Form.Item label={t('sourceLang')} name={'source_lang'}> | ||
<Select options={DeepLSourceLangOptions}></Select> | ||
</Form.Item> | ||
<Form.Item label={t('targetLang')} name={'target_lang'}> | ||
<Select options={DeepLTargetLangOptions}></Select> | ||
</Form.Item> | ||
</Form> | ||
); | ||
}; | ||
|
||
export default DeepLForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters