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

@@ -31,7 +31,7 @@ const AddRow: FC<Props> = ({
<div
className={
cn(
'p-1 rounded-md text-text-tertiary hover:bg-state-destructive-hover hover:text-text-destructive cursor-pointer',
'cursor-pointer rounded-md p-1 text-text-tertiary hover:bg-state-destructive-hover hover:text-text-destructive',
)
}
onClick={onRemove}

View File

@@ -26,7 +26,7 @@ const EditMetadatabatchItem: FC<Props> = ({
const isDeleted = payload.updateType === UpdateType.delete
return (
<div className='flex h-6 items-center space-x-0.5'>
{isUpdated ? <EditedBeacon onReset={() => onReset(payload.id)} /> : <div className='shrink-0 size-4' />}
{isUpdated ? <EditedBeacon onReset={() => onReset(payload.id)} /> : <div className='size-4 shrink-0' />}
<Label text={payload.name} isDeleted={isDeleted} />
{payload.isMultipleValue
? <InputHasSetMultipleValue
@@ -43,7 +43,7 @@ const EditMetadatabatchItem: FC<Props> = ({
<div
className={
cn(
'p-1 rounded-md text-text-tertiary hover:bg-state-destructive-hover hover:text-text-destructive cursor-pointer',
'cursor-pointer rounded-md p-1 text-text-tertiary hover:bg-state-destructive-hover hover:text-text-destructive',
isDeleted && 'cursor-default bg-state-destructive-hover text-text-destructive')
}
onClick={() => onRemove(payload.id)}

View File

@@ -21,12 +21,12 @@ const EditedBeacon: FC<Props> = ({
<div ref={ref} className='size-4 cursor-pointer'>
{isHovering ? (
<Tooltip popupContent={t('common.operation.reset')}>
<div className='flex justify-center items-center size-4 bg-text-accent-secondary rounded-full' onClick={onReset}>
<div className='flex size-4 items-center justify-center rounded-full bg-text-accent-secondary' onClick={onReset}>
<RiResetLeftLine className='size-[10px] text-text-primary-on-surface' />
</div>
</Tooltip>
) : (
<div className='flex items-center justify-center size-4'>
<div className='flex size-4 items-center justify-center'>
<div className='size-1 rounded-full bg-text-accent-secondary'></div>
</div>
)}

View File

@@ -22,7 +22,7 @@ const InputCombined: FC<Props> = ({
onChange,
readOnly,
}) => {
const className = cn('grow p-0.5 h-6 text-xs')
const className = cn('h-6 grow p-0.5 text-xs')
if (type === DataType.time) {
return (
<Datepicker

View File

@@ -16,11 +16,11 @@ const InputHasSetMultipleValue: FC<Props> = ({
}) => {
const { t } = useTranslation()
return (
<div className='grow h-6 p-0.5 rounded-md bg-components-input-bg-normal text-[0]'>
<div className={cn('inline-flex rounded-[5px] items-center h-5 pl-1.5 pr-0.5 bg-components-badge-white-to-dark border-[0.5px] border-components-panel-border shadow-xs space-x-0.5', readOnly && 'pr-1.5')}>
<div className='h-6 grow rounded-md bg-components-input-bg-normal p-0.5 text-[0]'>
<div className={cn('inline-flex h-5 items-center space-x-0.5 rounded-[5px] border-[0.5px] border-components-panel-border bg-components-badge-white-to-dark pl-1.5 pr-0.5 shadow-xs', readOnly && 'pr-1.5')}>
<div className='system-xs-regular text-text-secondary'>{t('dataset.metadata.batchEditMetadata.multipleValue')}</div>
{!readOnly && (
<div className='p-px rounded-[4px] text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary cursor-pointer'>
<div className='cursor-pointer rounded-[4px] p-px text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary'>
<RiCloseLine
className='size-3.5 '
onClick={onClear}

View File

@@ -16,8 +16,8 @@ const Label: FC<Props> = ({
}) => {
return (
<div className={cn(
'shrink-0 w-[136px] system-xs-medium text-text-tertiary truncate',
isDeleted && 'line-through text-text-quaternary',
'system-xs-medium w-[136px] shrink-0 truncate text-text-tertiary',
isDeleted && 'text-text-quaternary line-through',
className,
)}>
{text}

View File

@@ -118,7 +118,7 @@ const EditMetadataBatchModal: FC<Props> = ({
onClose={onHide}
className='!max-w-[640px]'
>
<div className='mt-1 system-xs-medium text-text-accent'>{t(`${i18nPrefix}.editDocumentsNum`, { num: documentNum })}</div>
<div className='system-xs-medium mt-1 text-text-accent'>{t(`${i18nPrefix}.editDocumentsNum`, { num: documentNum })}</div>
<div className='ml-[-16px] max-h-[305px] overflow-y-auto'>
<div className='mt-4 space-y-2'>
{templeList.map(item => (
@@ -133,7 +133,7 @@ const EditMetadataBatchModal: FC<Props> = ({
</div>
<div className='mt-4 pl-[18px]'>
<div className='flex items-center'>
<div className='mr-2 shrink-0 system-xs-medium-uppercase text-text-tertiary'>{t('dataset.metadata.createMetadata.title')}</div>
<div className='system-xs-medium-uppercase mr-2 shrink-0 text-text-tertiary'>{t('dataset.metadata.createMetadata.title')}</div>
<Divider bgStyle='gradient' />
</div>
<div className='mt-2 space-y-2'>
@@ -163,13 +163,13 @@ const EditMetadataBatchModal: FC<Props> = ({
</div>
<div className='mt-4 flex items-center justify-between'>
<div className='flex items-center select-none'>
<div className='flex select-none items-center'>
<Checkbox checked={isApplyToAllSelectDocument} onCheck={() => setIsApplyToAllSelectDocument(!isApplyToAllSelectDocument)} />
<div className='ml-2 mr-1 system-xs-medium text-text-secondary'>{t(`${i18nPrefix}.applyToAllSelectDocument`)}</div>
<div className='system-xs-medium ml-2 mr-1 text-text-secondary'>{t(`${i18nPrefix}.applyToAllSelectDocument`)}</div>
<Tooltip popupContent={
<div className='max-w-[240px]'>{t(`${i18nPrefix}.applyToAllSelectDocumentTip`)}</div>
} >
<div className='p-px cursor-pointer'>
<div className='cursor-pointer p-px'>
<RiQuestionLine className='size-3.5 text-text-tertiary' />
</div>
</Tooltip>