mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 23:16:58 +08:00
### What problem does this PR solve? Fix: Prevent password boxes other than login passwords from displaying passwords saved in the browser's password manager by default. #6033 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
29 lines
774 B
TypeScript
29 lines
774 B
TypeScript
import { useTranslate } from '@/hooks/common-hooks';
|
|
import { Form, Input, Typography } from 'antd';
|
|
|
|
interface IProps {
|
|
name?: string | string[];
|
|
}
|
|
|
|
export function TavilyItem({
|
|
name = ['prompt_config', 'tavily_api_key'],
|
|
}: IProps) {
|
|
const { t } = useTranslate('chat');
|
|
|
|
return (
|
|
<Form.Item label={'Tavily API Key'} tooltip={t('tavilyApiKeyTip')}>
|
|
<div className="flex flex-col gap-1">
|
|
<Form.Item name={name} noStyle>
|
|
<Input.Password
|
|
placeholder={t('tavilyApiKeyMessage')}
|
|
autoComplete="new-password"
|
|
/>
|
|
</Form.Item>
|
|
<Typography.Link href="https://app.tavily.com/home" target={'_blank'}>
|
|
{t('tavilyApiKeyHelp')}
|
|
</Typography.Link>
|
|
</div>
|
|
</Form.Item>
|
|
);
|
|
}
|