mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-20 20:59:06 +08:00
file uploader
This commit is contained in:
parent
efcd462a69
commit
079c802b5c
@ -87,6 +87,7 @@ const ChatInputArea = ({
|
|||||||
ref={holdSpaceRef}
|
ref={holdSpaceRef}
|
||||||
speechToTextConfig={speechToTextConfig}
|
speechToTextConfig={speechToTextConfig}
|
||||||
onShowVoiceInput={handleShowVoiceInput}
|
onShowVoiceInput={handleShowVoiceInput}
|
||||||
|
onSend={handleSend}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -17,10 +17,12 @@ import cn from '@/utils/classnames'
|
|||||||
type OperationProps = {
|
type OperationProps = {
|
||||||
speechToTextConfig?: EnableType
|
speechToTextConfig?: EnableType
|
||||||
onShowVoiceInput?: () => void
|
onShowVoiceInput?: () => void
|
||||||
|
onSend: () => void
|
||||||
}
|
}
|
||||||
const Operation = forwardRef<HTMLDivElement, OperationProps>(({
|
const Operation = forwardRef<HTMLDivElement, OperationProps>(({
|
||||||
speechToTextConfig,
|
speechToTextConfig,
|
||||||
onShowVoiceInput,
|
onShowVoiceInput,
|
||||||
|
onSend,
|
||||||
}, ref) => {
|
}, ref) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@ -48,6 +50,7 @@ const Operation = forwardRef<HTMLDivElement, OperationProps>(({
|
|||||||
<Button
|
<Button
|
||||||
className='ml-3 px-0 w-8'
|
className='ml-3 px-0 w-8'
|
||||||
variant='primary'
|
variant='primary'
|
||||||
|
onClick={onSend}
|
||||||
>
|
>
|
||||||
<RiSendPlane2Fill className='w-4 h-4' />
|
<RiSendPlane2Fill className='w-4 h-4' />
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -44,7 +44,7 @@ const FileFromLinkOrLocal = ({
|
|||||||
<div className='flex items-center p-1 h-8 bg-components-input-bg-active border border-components-input-border-active rounded-lg shadow-xs'>
|
<div className='flex items-center p-1 h-8 bg-components-input-bg-active border border-components-input-border-active rounded-lg shadow-xs'>
|
||||||
<input
|
<input
|
||||||
className='grow block mr-0.5 px-1 bg-transparent system-sm-regular outline-none appearance-none'
|
className='grow block mr-0.5 px-1 bg-transparent system-sm-regular outline-none appearance-none'
|
||||||
placeholder='Enter URL...'
|
placeholder={t('common.fileUploader.pasteFileLinkInputPlaceholder') || ''}
|
||||||
value={url}
|
value={url}
|
||||||
onChange={e => setUrl(e.target.value)}
|
onChange={e => setUrl(e.target.value)}
|
||||||
/>
|
/>
|
||||||
|
@ -37,7 +37,7 @@ const FileUploaderInAttachment = () => {
|
|||||||
<Button
|
<Button
|
||||||
key={option.value}
|
key={option.value}
|
||||||
variant='tertiary'
|
variant='tertiary'
|
||||||
className={cn('grow', open && 'bg-components-button-tertiary-bg-hover')}
|
className={cn('basis-1/2', open && 'bg-components-button-tertiary-bg-hover')}
|
||||||
>
|
>
|
||||||
{option.icon}
|
{option.icon}
|
||||||
<span className='ml-1'>{option.label}</span>
|
<span className='ml-1'>{option.label}</span>
|
||||||
|
@ -554,7 +554,8 @@ const translation = {
|
|||||||
},
|
},
|
||||||
fileUploader: {
|
fileUploader: {
|
||||||
uploadFromComputer: 'Local upload',
|
uploadFromComputer: 'Local upload',
|
||||||
pasteImageLink: 'Paste file link',
|
pasteFileLink: 'Paste file link',
|
||||||
|
pasteFileLinkInputPlaceholder: 'Enter URL...',
|
||||||
},
|
},
|
||||||
tag: {
|
tag: {
|
||||||
placeholder: 'All Tags',
|
placeholder: 'All Tags',
|
||||||
|
@ -551,6 +551,7 @@ const translation = {
|
|||||||
fileUploader: {
|
fileUploader: {
|
||||||
uploadFromComputer: '从本地上传',
|
uploadFromComputer: '从本地上传',
|
||||||
pasteFileLink: '粘贴文件链接',
|
pasteFileLink: '粘贴文件链接',
|
||||||
|
pasteFileLinkInputPlaceholder: '输入文件链接',
|
||||||
},
|
},
|
||||||
tag: {
|
tag: {
|
||||||
placeholder: '全部标签',
|
placeholder: '全部标签',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user