mirror of https://github.com/langgenius/dify.git
feat: update UI for dataset creation step three
This commit is contained in:
parent
14f14420e7
commit
e206866908
|
|
@ -4,6 +4,7 @@ import {
|
|||
DocumentProcessingPriority,
|
||||
Plan,
|
||||
} from '../type'
|
||||
import cn from '@/utils/classnames'
|
||||
import { useProviderContext } from '@/context/provider-context'
|
||||
import {
|
||||
ZapFast,
|
||||
|
|
@ -11,7 +12,11 @@ import {
|
|||
} from '@/app/components/base/icons/src/vender/solid/general'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
|
||||
const PriorityLabel = () => {
|
||||
type PriorityLabelProps = {
|
||||
className?: string
|
||||
}
|
||||
|
||||
const PriorityLabel = ({ className }: PriorityLabelProps) => {
|
||||
const { t } = useTranslation()
|
||||
const { plan } = useProviderContext()
|
||||
|
||||
|
|
@ -37,10 +42,10 @@ const PriorityLabel = () => {
|
|||
}
|
||||
</div>
|
||||
}>
|
||||
<span className={`
|
||||
<span className={cn(`
|
||||
shrink-0 flex items-center ml-1 px-1 h-[18px] rounded-[5px] border border-text-accent-secondary
|
||||
text-2xs font-medium text-text-accent-secondary
|
||||
`}>
|
||||
`, className)}>
|
||||
{
|
||||
plan.type === Plan.professional && (
|
||||
<ZapNarrow className='mr-0.5 size-3' />
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
|
|||
</div>
|
||||
{
|
||||
enableBilling && (
|
||||
<PriorityLabel />
|
||||
<PriorityLabel className='ml-0' />
|
||||
)
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
'use client'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { RiBookOpenLine } from '@remixicon/react'
|
||||
import EmbeddingProcess from '../embedding-process'
|
||||
|
||||
import s from './index.module.css'
|
||||
import cn from '@/utils/classnames'
|
||||
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
|
||||
import type { FullDocumentDetail, createDocumentResponse } from '@/models/datasets'
|
||||
import AppIcon from '@/app/components/base/app-icon'
|
||||
|
|
@ -58,13 +57,17 @@ const StepThree = ({ datasetId, datasetName, indexingType, creationCache, retrie
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
{!isMobile && <div className={cn(s.sideTip)}>
|
||||
<div className={s.tipCard}>
|
||||
<span className={s.icon} />
|
||||
<div className={s.title}>{t('datasetCreation.stepThree.sideTipTitle')}</div>
|
||||
<div className={s.content}>{t('datasetCreation.stepThree.sideTipContent')}</div>
|
||||
{!isMobile && (
|
||||
<div className="shrink-0 pt-[88px] pr-8 text-xs">
|
||||
<div className="flex flex-col gap-3 w-[328px] p-6 text-text-tertiary bg-background-section rounded-xl">
|
||||
<div className="flex justify-center items-center size-10 bg-components-card-bg rounded-[10px] shadow-lg">
|
||||
<RiBookOpenLine className="size-5 text-text-accent" />
|
||||
</div>
|
||||
<div className="text-base text-text-secondary">{t('datasetCreation.stepThree.sideTipTitle')}</div>
|
||||
<div className="text-text-tertiary">{t('datasetCreation.stepThree.sideTipContent')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export const FieldInfo: FC<IFieldInfoProps> = ({
|
|||
|
||||
return (
|
||||
<div className={cn('flex items-center gap-1 py-0.5 min-h-5 text-xs', editAlignTop && '!items-start', readAlignTop && '!items-start pt-1')}>
|
||||
<div className={cn('w-[200px] text-text-tertiary font-medium overflow-hidden text-ellipsis whitespace-nowrap', editAlignTop && 'pt-1')}>{label}</div>
|
||||
<div className={cn('w-[200px] text-text-tertiary overflow-hidden text-ellipsis whitespace-nowrap', editAlignTop && 'pt-1')}>{label}</div>
|
||||
<div className="grow flex items-center gap-1 text-text-secondary">
|
||||
{valueIcon}
|
||||
{!showEdit
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ const translation = {
|
|||
},
|
||||
stepThree: {
|
||||
creationTitle: '🎉 Knowledge created',
|
||||
creationContent: 'We automatically named the Knowledge, you can modify it at any time',
|
||||
creationContent: 'We automatically named the Knowledge, you can modify it at any time.',
|
||||
label: 'Knowledge name',
|
||||
additionTitle: '🎉 Document uploaded',
|
||||
additionP1: 'The document has been uploaded to the Knowledge',
|
||||
|
|
|
|||
Loading…
Reference in New Issue