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:
Joel
2025-03-21 17:41:03 +08:00
committed by GitHub
parent e61415223b
commit 7709d9df20
1435 changed files with 13372 additions and 11612 deletions

View File

@@ -29,11 +29,11 @@ const CSVDownload: FC<ICSVDownloadProps> = ({
<div className='mt-6'>
<div className='system-sm-medium text-text-primary'>{t('share.generation.csvStructureTitle')}</div>
<div className='mt-2 max-h-[500px] overflow-auto'>
<table className='table-fixed w-full border-separate border-spacing-0 border border-divider-regular rounded-lg text-xs'>
<table className='w-full table-fixed border-separate border-spacing-0 rounded-lg border border-divider-regular text-xs'>
<thead className='text-text-tertiary'>
<tr>
{addQueryContentVars.map((item, i) => (
<td key={i} className='h-9 pl-3 pr-2 border-b border-divider-regular'>{item.name}</td>
<td key={i} className='h-9 border-b border-divider-regular pl-3 pr-2'>{item.name}</td>
))}
</tr>
</thead>
@@ -47,7 +47,7 @@ const CSVDownload: FC<ICSVDownloadProps> = ({
</table>
</div>
<CSVDownloader
className="block mt-2 cursor-pointer"
className="mt-2 block cursor-pointer"
type={Type.Link}
filename={'template'}
bom={true}
@@ -58,8 +58,8 @@ const CSVDownload: FC<ICSVDownloadProps> = ({
template,
]}
>
<div className='flex items-center h-[18px] space-x-1 text-text-accent system-xs-medium'>
<DownloadIcon className='w-3 h-3' />
<div className='system-xs-medium flex h-[18px] items-center space-x-1 text-text-accent'>
<DownloadIcon className='h-3 w-3' />
<span>{t('share.generation.downloadTemplate')}</span>
</div>
</CSVDownloader>

View File

@@ -41,15 +41,15 @@ const CSVReader: FC<Props> = ({
<div
{...getRootProps()}
className={cn(
'flex items-center h-20 rounded-xl bg-components-dropzone-bg border border-dashed border-components-dropzone-border system-sm-regular',
acceptedFile && 'px-6 bg-components-panel-on-panel-item-bg border-solid border-components-panel-border hover:bg-components-panel-on-panel-item-bg-hover hover:border-components-panel-bg-blur',
zoneHover && 'bg-components-dropzone-bg-accent border border-components-dropzone-border-accent',
'system-sm-regular flex h-20 items-center rounded-xl border border-dashed border-components-dropzone-border bg-components-dropzone-bg',
acceptedFile && 'border-solid border-components-panel-border bg-components-panel-on-panel-item-bg px-6 hover:border-components-panel-bg-blur hover:bg-components-panel-on-panel-item-bg-hover',
zoneHover && 'border border-components-dropzone-border-accent bg-components-dropzone-bg-accent',
)}
>
{
acceptedFile
? (
<div className='w-full flex items-center space-x-2'>
<div className='flex w-full items-center space-x-2'>
<CSVIcon className="shrink-0" />
<div className='flex w-0 grow'>
<span className='max-w-[calc(100%_-_30px)] truncate text-text-secondary'>{acceptedFile.name.replace(/.csv$/, '')}</span>
@@ -58,9 +58,9 @@ const CSVReader: FC<Props> = ({
</div>
)
: (
<div className='w-full flex items-center justify-center space-x-2'>
<div className='flex w-full items-center justify-center space-x-2'>
<CSVIcon className="shrink-0" />
<div className='text-text-tertiary'>{t('share.generation.csvUploadTitle')}<span className='text-text-accent cursor-pointer'>{t('share.generation.browse')}</span></div>
<div className='text-text-tertiary'>{t('share.generation.csvUploadTitle')}<span className='cursor-pointer text-text-accent'>{t('share.generation.browse')}</span></div>
</div>
)}
</div>

View File

@@ -49,8 +49,8 @@ const RunBatch: FC<IRunBatchProps> = ({
onClick={handleSend}
disabled={!isParsed || !isAllFinished}
>
<Icon className={cn(!isAllFinished && 'animate-spin', 'shrink-0 w-4 h-4 mr-1')} aria-hidden="true" />
<span className='uppercase text-[13px]'>{t('share.generation.run')}</span>
<Icon className={cn(!isAllFinished && 'animate-spin', 'mr-1 h-4 w-4 shrink-0')} aria-hidden="true" />
<span className='text-[13px] uppercase'>{t('share.generation.run')}</span>
</Button>
</div>
</div>

View File

@@ -35,12 +35,12 @@ const ResDownload: FC<IResDownloadProps> = ({
>
{isMobile && (
<ActionButton>
<RiDownloadLine className='w-4 h-4' />
<RiDownloadLine className='h-4 w-4' />
</ActionButton>
)}
{!isMobile && (
<Button className={cn('space-x-1')}>
<RiDownloadLine className='w-4 h-4' />
<RiDownloadLine className='h-4 w-4' />
<span>{t('common.operation.download')}</span>
</Button>
)}