wwf
3 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/datasets/create/website/no-data.tsx
@@ -6,7 +6,6 @@
import { Icon3Dots } from '@/app/components/base/icons/src/vender/line/others'
import Button from '@/app/components/base/button'
import { DataSourceProvider } from '@/models/common'
import { ENABLE_WEBSITE_FIRECRAWL, ENABLE_WEBSITE_JINAREADER, ENABLE_WEBSITE_WATERCRAWL } from '@/config'
const I18N_PREFIX = 'datasetCreation.stepOne.website'
@@ -22,40 +21,29 @@
  const { t } = useTranslation()
  const providerConfig = {
    [DataSourceProvider.jinaReader]: ENABLE_WEBSITE_JINAREADER ? {
    [DataSourceProvider.jinaReader]: {
      emoji: <span className={s.jinaLogo} />,
      title: t(`${I18N_PREFIX}.jinaReaderNotConfigured`),
      description: t(`${I18N_PREFIX}.jinaReaderNotConfiguredDescription`),
    } : null,
    [DataSourceProvider.fireCrawl]: ENABLE_WEBSITE_FIRECRAWL ? {
    },
    [DataSourceProvider.fireCrawl]: {
      emoji: '🔥',
      title: t(`${I18N_PREFIX}.fireCrawlNotConfigured`),
      description: t(`${I18N_PREFIX}.fireCrawlNotConfiguredDescription`),
    } : null,
    [DataSourceProvider.waterCrawl]: ENABLE_WEBSITE_WATERCRAWL ? {
      emoji: '💧',
      title: t(`${I18N_PREFIX}.waterCrawlNotConfigured`),
      description: t(`${I18N_PREFIX}.waterCrawlNotConfiguredDescription`),
    } : null,
    },
  }
  const currentProvider = providerConfig[provider] || providerConfig[DataSourceProvider.jinaReader]
  if (!currentProvider) return null
  const currentProvider = providerConfig[provider]
  return (
    <>
      <div className='mt-4 max-w-[640px] rounded-2xl bg-workflow-process-bg p-6'>
        <div className='flex h-12 w-12 items-center justify-center rounded-[10px] border-[0.5px]
          border-components-card-border bg-components-card-bg shadow-lg shadow-shadow-shadow-5 backdrop-blur-[5px]'>
      <div className='max-w-[640px] p-6 rounded-2xl bg-gray-50 mt-4'>
        <div className='flex w-11 h-11 items-center justify-center bg-gray-50 rounded-xl border-[0.5px] border-gray-100 shadow-lg'>
          {currentProvider.emoji}
        </div>
        <div className='mb-1 mt-2 flex flex-col gap-y-1 pb-3 pt-1'>
          <span className='system-md-semibold text-text-secondary'>
            {currentProvider.title}
            <Icon3Dots className='relative -left-1.5 -top-2.5 inline' />
          </span>
          <div className='system-sm-regular text-text-tertiary'>
        <div className='my-2'>
          <span className='text-gray-700 font-semibold'>{currentProvider.title}<Icon3Dots className='inline relative -top-3 -left-1.5' /></span>
          <div className='mt-1 pb-3 text-gray-500 text-[13px] font-normal'>
            {currentProvider.description}
          </div>
        </div>