2023-05-15 08:51:32 +08:00
|
|
|
'use client'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
2025-05-17 12:32:27 +08:00
|
|
|
import { basePath } from '@/utils/var'
|
2024-06-20 11:05:08 +08:00
|
|
|
import {
|
|
|
|
RiAddLine,
|
2024-09-30 15:38:43 +08:00
|
|
|
RiArrowRightLine,
|
2024-06-20 11:05:08 +08:00
|
|
|
} from '@remixicon/react'
|
2025-06-19 15:40:15 +08:00
|
|
|
import Link from 'next/link'
|
2023-05-15 08:51:32 +08:00
|
|
|
|
2025-06-19 15:40:15 +08:00
|
|
|
type CreateAppCardProps = {
|
|
|
|
ref?: React.Ref<HTMLAnchorElement>
|
|
|
|
}
|
|
|
|
|
|
|
|
const CreateAppCard = ({ ref }: CreateAppCardProps) => {
|
2023-05-15 08:51:32 +08:00
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
return (
|
2025-03-21 17:41:03 +08:00
|
|
|
<div className='bg-background-default-dimm flex min-h-[160px] flex-col rounded-xl border-[0.5px]
|
|
|
|
border-components-panel-border transition-all duration-200 ease-in-out'
|
2024-09-30 15:38:43 +08:00
|
|
|
>
|
2025-06-19 15:40:15 +08:00
|
|
|
<Link ref={ref} className='group flex grow cursor-pointer items-start p-4' href={`${basePath}/datasets/create`}>
|
2024-09-30 15:38:43 +08:00
|
|
|
<div className='flex items-center gap-3'>
|
2025-03-21 17:41:03 +08:00
|
|
|
<div className='flex h-10 w-10 items-center justify-center rounded-lg border border-dashed border-divider-regular bg-background-default-lighter
|
|
|
|
p-2 group-hover:border-solid group-hover:border-effects-highlight group-hover:bg-background-default-dodge'
|
2024-09-30 15:38:43 +08:00
|
|
|
>
|
2025-06-19 15:40:15 +08:00
|
|
|
<RiAddLine className='h-4 w-4 text-text-tertiary group-hover:text-text-accent' />
|
2024-09-30 15:38:43 +08:00
|
|
|
</div>
|
|
|
|
<div className='system-md-semibold text-text-secondary group-hover:text-text-accent'>{t('dataset.createDataset')}</div>
|
2023-05-15 08:51:32 +08:00
|
|
|
</div>
|
2025-06-19 15:40:15 +08:00
|
|
|
</Link>
|
2025-03-21 17:41:03 +08:00
|
|
|
<div className='system-xs-regular p-4 pt-0 text-text-tertiary'>{t('dataset.createDatasetIntro')}</div>
|
2025-06-19 15:40:15 +08:00
|
|
|
<Link className='group flex cursor-pointer items-center gap-1 rounded-b-xl border-t-[0.5px] border-divider-subtle p-4' href={`${basePath}/datasets/connect`}>
|
2024-09-30 15:38:43 +08:00
|
|
|
<div className='system-xs-medium text-text-tertiary group-hover:text-text-accent'>{t('dataset.connectDataset')}</div>
|
2025-03-21 17:41:03 +08:00
|
|
|
<RiArrowRightLine className='h-3.5 w-3.5 text-text-tertiary group-hover:text-text-accent' />
|
2025-06-19 15:40:15 +08:00
|
|
|
</Link>
|
2024-09-30 15:38:43 +08:00
|
|
|
</div>
|
2023-05-15 08:51:32 +08:00
|
|
|
)
|
2025-03-21 17:41:03 +08:00
|
|
|
}
|
2023-05-15 08:51:32 +08:00
|
|
|
|
2024-03-25 07:13:50 +00:00
|
|
|
CreateAppCard.displayName = 'CreateAppCard'
|
|
|
|
|
2023-05-15 08:51:32 +08:00
|
|
|
export default CreateAppCard
|