| <div className={cn('group/tag-add mt-1 flex items-center gap-x-0.5', !isSpecialMode ? 'rounded-md border border-dashed border-divider-deep px-1.5' : '')}> | <div className={cn('group/tag-add mt-1 flex items-center gap-x-0.5', !isSpecialMode ? 'rounded-md border border-dashed border-divider-deep px-1.5' : '')}> | ||||
| {!isSpecialMode && !focused && <RiAddLine className='h-3.5 w-3.5 text-text-placeholder group-hover/tag-add:text-text-secondary' />} | {!isSpecialMode && !focused && <RiAddLine className='h-3.5 w-3.5 text-text-placeholder group-hover/tag-add:text-text-secondary' />} | ||||
| <AutosizeInput | <AutosizeInput | ||||
| inputClassName={cn('appearance-none caret-[#295EFF] outline-none placeholder:text-text-placeholder group-hover/tag-add:placeholder:text-text-secondary', isSpecialMode ? 'bg-transparent' : '')} | |||||
| inputClassName={cn('appearance-none text-text-primary caret-[#295EFF] outline-none placeholder:text-text-placeholder group-hover/tag-add:placeholder:text-text-secondary', isSpecialMode ? 'bg-transparent' : '')} | |||||
| className={cn( | className={cn( | ||||
| !isInWorkflow && 'max-w-[300px]', | !isInWorkflow && 'max-w-[300px]', | ||||
| isInWorkflow && 'max-w-[146px]', | isInWorkflow && 'max-w-[146px]', |
| <div className={s.emptyTip}> | <div className={s.emptyTip}> | ||||
| {t(`datasetDocuments.list.empty.${type}.tip`)} | {t(`datasetDocuments.list.empty.${type}.tip`)} | ||||
| </div> | </div> | ||||
| {type === 'upload' && canAdd && <Button onClick={onClick} className={s.addFileBtn}> | |||||
| {type === 'upload' && canAdd && <Button onClick={onClick} className={s.addFileBtn} variant='secondary-accent'> | |||||
| <PlusIcon className={s.plusIcon} />{t('datasetDocuments.list.addFile')} | <PlusIcon className={s.plusIcon} />{t('datasetDocuments.list.addFile')} | ||||
| </Button>} | </Button>} | ||||
| </div> | </div> | ||||
| ? 'https://docs.dify.ai/zh-hans/guides/knowledge-base/integrate-knowledge-within-application' | ? 'https://docs.dify.ai/zh-hans/guides/knowledge-base/integrate-knowledge-within-application' | ||||
| : 'https://docs.dify.ai/en/guides/knowledge-base/integrate-knowledge-within-application' | : 'https://docs.dify.ai/en/guides/knowledge-base/integrate-knowledge-within-application' | ||||
| } | } | ||||
| > | |||||
| > | |||||
| <span>{t('datasetDocuments.list.learnMore')}</span> | <span>{t('datasetDocuments.list.learnMore')}</span> | ||||
| <RiExternalLinkLine className='h-3 w-3' /> | <RiExternalLinkLine className='h-3 w-3' /> | ||||
| </a> | </a> |
| @apply text-text-secondary text-sm; | @apply text-text-secondary text-sm; | ||||
| } | } | ||||
| .addFileBtn { | .addFileBtn { | ||||
| @apply mt-4 w-fit !text-[13px] text-primary-600 font-medium bg-white border-[0.5px]; | |||||
| @apply mt-4 w-fit !text-[13px] font-medium border-[0.5px]; | |||||
| } | } | ||||
| .plusIcon { | .plusIcon { | ||||
| @apply w-4 h-4 mr-2 stroke-current stroke-[1.5px]; | @apply w-4 h-4 mr-2 stroke-current stroke-[1.5px]; | ||||
| @apply flex items-center justify-center h-full; | @apply flex items-center justify-center h-full; | ||||
| } | } | ||||
| .emptyElement { | .emptyElement { | ||||
| @apply bg-gray-50 w-[560px] h-fit box-border px-5 py-4 rounded-2xl; | |||||
| @apply bg-components-panel-on-panel-item-bg border-divider-subtle w-[560px] h-fit box-border px-5 py-4 rounded-2xl; | |||||
| } | } | ||||
| .emptyTitle { | .emptyTitle { | ||||
| @apply text-gray-700 font-semibold; | |||||
| @apply text-text-secondary font-semibold; | |||||
| } | } | ||||
| .emptyTip { | .emptyTip { | ||||
| @apply mt-2 text-gray-500 text-sm font-normal; | |||||
| @apply mt-2 text-text-primary text-sm font-normal; | |||||
| } | } | ||||
| .emptySymbolIconWrapper { | .emptySymbolIconWrapper { | ||||
| @apply w-[44px] h-[44px] border border-solid border-gray-100 rounded-lg flex items-center justify-center mb-2; | |||||
| @apply w-[44px] h-[44px] border border-solid border-components-button-secondary-border rounded-lg flex items-center justify-center mb-2; | |||||
| } | } | ||||
| .commonIcon { | .commonIcon { | ||||
| @apply w-4 h-4 inline-block align-middle; | @apply w-4 h-4 inline-block align-middle; |
| </div> | </div> | ||||
| {isPartialMembers && ( | {isPartialMembers && ( | ||||
| <div className='max-h-[360px] overflow-y-auto border-t-[1px] border-divider-regular pb-1 pl-1 pr-1'> | <div className='max-h-[360px] overflow-y-auto border-t-[1px] border-divider-regular pb-1 pl-1 pr-1'> | ||||
| <div className='sticky left-0 top-0 z-10 bg-white p-2 pb-1'> | |||||
| <div className='sticky left-0 top-0 z-10 bg-components-panel-on-panel-item-bg p-2 pb-1'> | |||||
| <Input | <Input | ||||
| showLeftIcon | showLeftIcon | ||||
| showClearIcon | showClearIcon |
| <Tooltip | <Tooltip | ||||
| popupContent={isCopied ? `${t('appApi.copied')}` : `${t('appApi.copy')}`} | popupContent={isCopied ? `${t('appApi.copied')}` : `${t('appApi.copy')}`} | ||||
| > | > | ||||
| <div className='r-0 absolute left-0 top-0 w-full cursor-pointer truncate pl-2 pr-2' onClick={copyHandle}>{value.url}</div> | |||||
| <div className='r-0 absolute left-0 top-0 w-full cursor-pointer truncate pl-2 pr-2 text-text-primary' onClick={copyHandle}>{value.url}</div> | |||||
| </Tooltip> | </Tooltip> | ||||
| </div> | </div> | ||||
| <div className="h-4 shrink-0 border bg-divider-regular" /> | <div className="h-4 shrink-0 border bg-divider-regular" /> |
| empty: { | empty: { | ||||
| title: 'There is no documentation yet', | title: 'There is no documentation yet', | ||||
| upload: { | upload: { | ||||
| tip: 'You can upload files, sync from the website, or from webb apps like Notion, GitHub, etc.', | |||||
| tip: 'You can upload files, sync from the website, or from web apps like Notion, GitHub, etc.', | |||||
| }, | }, | ||||
| sync: { | sync: { | ||||
| tip: 'Dify will periodically download files from your Notion and complete processing.', | tip: 'Dify will periodically download files from your Notion and complete processing.', |
| empty: { | empty: { | ||||
| title: 'ยังไม่มีเอกสาร', | title: 'ยังไม่มีเอกสาร', | ||||
| upload: { | upload: { | ||||
| tip: 'คุณสามารถอัปโหลดไฟล์ ซิงค์จากเว็บไซต์ หรือจากแอป webb เช่น Notion, GitHub เป็นต้น', | |||||
| tip: 'คุณสามารถอัปโหลดไฟล์ ซิงค์จากเว็บไซต์ หรือจากแอป web เช่น Notion, GitHub เป็นต้น', | |||||
| }, | }, | ||||
| sync: { | sync: { | ||||
| tip: 'Dify จะดาวน์โหลดไฟล์จาก Notion ของคุณเป็นระยะและดําเนินการให้เสร็จสมบูรณ์', | tip: 'Dify จะดาวน์โหลดไฟล์จาก Notion ของคุณเป็นระยะและดําเนินการให้เสร็จสมบูรณ์', |