mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-19 06:35:56 +08:00
file uploader
This commit is contained in:
parent
efcd462a69
commit
079c802b5c
@ -87,6 +87,7 @@ const ChatInputArea = ({
|
||||
ref={holdSpaceRef}
|
||||
speechToTextConfig={speechToTextConfig}
|
||||
onShowVoiceInput={handleShowVoiceInput}
|
||||
onSend={handleSend}
|
||||
/>
|
||||
)
|
||||
|
||||
|
@ -17,10 +17,12 @@ import cn from '@/utils/classnames'
|
||||
type OperationProps = {
|
||||
speechToTextConfig?: EnableType
|
||||
onShowVoiceInput?: () => void
|
||||
onSend: () => void
|
||||
}
|
||||
const Operation = forwardRef<HTMLDivElement, OperationProps>(({
|
||||
speechToTextConfig,
|
||||
onShowVoiceInput,
|
||||
onSend,
|
||||
}, ref) => {
|
||||
return (
|
||||
<div
|
||||
@ -48,6 +50,7 @@ const Operation = forwardRef<HTMLDivElement, OperationProps>(({
|
||||
<Button
|
||||
className='ml-3 px-0 w-8'
|
||||
variant='primary'
|
||||
onClick={onSend}
|
||||
>
|
||||
<RiSendPlane2Fill className='w-4 h-4' />
|
||||
</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'>
|
||||
<input
|
||||
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}
|
||||
onChange={e => setUrl(e.target.value)}
|
||||
/>
|
||||
|
@ -37,7 +37,7 @@ const FileUploaderInAttachment = () => {
|
||||
<Button
|
||||
key={option.value}
|
||||
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}
|
||||
<span className='ml-1'>{option.label}</span>
|
||||
|
@ -554,7 +554,8 @@ const translation = {
|
||||
},
|
||||
fileUploader: {
|
||||
uploadFromComputer: 'Local upload',
|
||||
pasteImageLink: 'Paste file link',
|
||||
pasteFileLink: 'Paste file link',
|
||||
pasteFileLinkInputPlaceholder: 'Enter URL...',
|
||||
},
|
||||
tag: {
|
||||
placeholder: 'All Tags',
|
||||
|
@ -551,6 +551,7 @@ const translation = {
|
||||
fileUploader: {
|
||||
uploadFromComputer: '从本地上传',
|
||||
pasteFileLink: '粘贴文件链接',
|
||||
pasteFileLinkInputPlaceholder: '输入文件链接',
|
||||
},
|
||||
tag: {
|
||||
placeholder: '全部标签',
|
||||
|
Loading…
x
Reference in New Issue
Block a user