mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-24 10:13:01 +08:00
Chore: frontend infrastructure upgrade (#16420)
Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
@@ -64,7 +64,7 @@ const EmptyElement: FC<{ canAdd: boolean; onClick: () => void; type?: 'upload' |
|
||||
<div className={s.emptySymbolIconWrapper}>
|
||||
{type === 'upload' ? <FolderPlusIcon /> : <NotionIcon />}
|
||||
</div>
|
||||
<span className={s.emptyTitle}>{t('datasetDocuments.list.empty.title')}<ThreeDotsIcon className='inline relative -top-3 -left-1.5' /></span>
|
||||
<span className={s.emptyTitle}>{t('datasetDocuments.list.empty.title')}<ThreeDotsIcon className='relative -left-1.5 -top-3 inline' /></span>
|
||||
<div className={s.emptyTip}>
|
||||
{t(`datasetDocuments.list.empty.${type}.tip`)}
|
||||
</div>
|
||||
@@ -252,22 +252,22 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
|
||||
})
|
||||
|
||||
return (
|
||||
<div className='flex flex-col h-full overflow-y-auto'>
|
||||
<div className='flex h-full flex-col overflow-y-auto'>
|
||||
<div className='flex flex-col justify-center gap-1 px-6 pt-4'>
|
||||
<h1 className='text-base font-semibold text-text-primary'>{t('datasetDocuments.list.title')}</h1>
|
||||
<div className='flex items-center text-sm font-normal text-text-tertiary space-x-0.5'>
|
||||
<div className='flex items-center space-x-0.5 text-sm font-normal text-text-tertiary'>
|
||||
<span>{t('datasetDocuments.list.desc')}</span>
|
||||
<a
|
||||
className='flex items-center text-text-accent'
|
||||
target='_blank'
|
||||
href='https://docs.dify.ai/guides/knowledge-base/integrate-knowledge-within-application'>
|
||||
<span>{t('datasetDocuments.list.learnMore')}</span>
|
||||
<RiExternalLinkLine className='w-3 h-3' />
|
||||
<RiExternalLinkLine className='h-3 w-3' />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex flex-col px-6 py-4 flex-1'>
|
||||
<div className='flex items-center justify-between flex-wrap'>
|
||||
<div className='flex flex-1 flex-col px-6 py-4'>
|
||||
<div className='flex flex-wrap items-center justify-between'>
|
||||
<Input
|
||||
showLeftIcon
|
||||
showClearIcon
|
||||
@@ -276,13 +276,13 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
|
||||
onChange={e => handleInputChange(e.target.value)}
|
||||
onClear={() => handleInputChange('')}
|
||||
/>
|
||||
<div className='flex gap-2 justify-center items-center !h-8'>
|
||||
<div className='flex !h-8 items-center justify-center gap-2'>
|
||||
{!isFreePlan && <AutoDisabledDocument datasetId={datasetId} />}
|
||||
<IndexFailed datasetId={datasetId} />
|
||||
{!embeddingAvailable && <StatusWithAction type='warning' description={t('dataset.embeddingModelNotAvailable')} />}
|
||||
{embeddingAvailable && (
|
||||
<Button variant='secondary' className='shrink-0' onClick={showEditMetadataModal}>
|
||||
<RiDraftLine className='size-4 mr-1' />
|
||||
<RiDraftLine className='mr-1 size-4' />
|
||||
{t('dataset.metadata.metadata')}
|
||||
</Button>
|
||||
)}
|
||||
@@ -300,7 +300,7 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
|
||||
)}
|
||||
{embeddingAvailable && (
|
||||
<Button variant='primary' onClick={routeToDocCreate} className='shrink-0'>
|
||||
<PlusIcon className={cn('h-4 w-4 mr-2 stroke-current')} />
|
||||
<PlusIcon className={cn('mr-2 h-4 w-4 stroke-current')} />
|
||||
{isDataSourceNotion && t('datasetDocuments.list.addPages')}
|
||||
{isDataSourceWeb && t('datasetDocuments.list.addUrl')}
|
||||
{(!dataset?.data_source_type || isDataSourceFile) && t('datasetDocuments.list.addFile')}
|
||||
|
||||
Reference in New Issue
Block a user