| {/* Color Select */} | {/* Color Select */} | ||||
| <div className={cn('flex items-center justify-between p-3 pb-0')}> | <div className={cn('flex items-center justify-between p-3 pb-0')}> | ||||
| <p className='system-xs-medium-uppercase mb-2 text-text-primary'>Choose Style</p> | <p className='system-xs-medium-uppercase mb-2 text-text-primary'>Choose Style</p> | ||||
| {showStyleColors ? <ChevronDownIcon className='h-4 w-4' onClick={() => setShowStyleColors(!showStyleColors)} /> : <ChevronUpIcon className='h-4 w-4' onClick={() => setShowStyleColors(!showStyleColors)} />} | |||||
| {showStyleColors ? <ChevronDownIcon className='h-4 w-4 cursor-pointer text-text-quaternary' onClick={() => setShowStyleColors(!showStyleColors)} /> | |||||
| : <ChevronUpIcon className='h-4 w-4 cursor-pointer text-text-quaternary' onClick={() => setShowStyleColors(!showStyleColors)} />} | |||||
| </div> | </div> | ||||
| {showStyleColors && <div className='grid w-full grid-cols-8 gap-1 px-3'> | {showStyleColors && <div className='grid w-full grid-cols-8 gap-1 px-3'> | ||||
| {backgroundColors.map((color) => { | {backgroundColors.map((color) => { |
| } | } | ||||
| <div className='absolute left-1/2 top-1/2 z-[2] flex -translate-x-1/2 -translate-y-1/2 flex-col items-center'> | <div className='absolute left-1/2 top-1/2 z-[2] flex -translate-x-1/2 -translate-y-1/2 flex-col items-center'> | ||||
| <div className='relative mb-3 flex h-14 w-14 items-center justify-center rounded-xl border border-dashed border-divider-deep bg-components-card-bg shadow-lg'> | <div className='relative mb-3 flex h-14 w-14 items-center justify-center rounded-xl border border-dashed border-divider-deep bg-components-card-bg shadow-lg'> | ||||
| <Group className='h-5 w-5' /> | |||||
| <Group className='h-5 w-5 text-text-primary' /> | |||||
| <Line className='absolute right-[-1px] top-1/2 -translate-y-1/2' /> | <Line className='absolute right-[-1px] top-1/2 -translate-y-1/2' /> | ||||
| <Line className='absolute left-[-1px] top-1/2 -translate-y-1/2' /> | <Line className='absolute left-[-1px] top-1/2 -translate-y-1/2' /> | ||||
| <Line className='absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 rotate-90' /> | <Line className='absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 rotate-90' /> |
| import Link from 'next/link' | import Link from 'next/link' | ||||
| import cn from '@/utils/classnames' | import cn from '@/utils/classnames' | ||||
| import { NoToolPlaceholder } from '../../base/icons/src/vender/other' | import { NoToolPlaceholder } from '../../base/icons/src/vender/other' | ||||
| import useTheme from '@/hooks/use-theme' | |||||
| type Props = { | type Props = { | ||||
| type?: ToolTypeEnum | type?: ToolTypeEnum | ||||
| isAgent?: boolean | isAgent?: boolean | ||||
| isAgent, | isAgent, | ||||
| }: Props) => { | }: Props) => { | ||||
| const { t } = useTranslation() | const { t } = useTranslation() | ||||
| const { theme } = useTheme() | |||||
| const hasLink = type && [ToolTypeEnum.Custom, ToolTypeEnum.MCP].includes(type) | const hasLink = type && [ToolTypeEnum.Custom, ToolTypeEnum.MCP].includes(type) | ||||
| const Comp = (hasLink ? Link : 'div') as any | const Comp = (hasLink ? Link : 'div') as any | ||||
| return ( | return ( | ||||
| <div className='flex h-[336px] flex-col items-center justify-center'> | <div className='flex h-[336px] flex-col items-center justify-center'> | ||||
| <NoToolPlaceholder /> | |||||
| <NoToolPlaceholder className={theme === 'dark' ? 'invert' : ''} /> | |||||
| <div className='mb-1 mt-2 text-[13px] font-medium leading-[18px] text-text-primary'> | <div className='mb-1 mt-2 text-[13px] font-medium leading-[18px] text-text-primary'> | ||||
| {hasTitle ? t(`tools.addToolModal.${renderType}.title`) : 'No tools available'} | {hasTitle ? t(`tools.addToolModal.${renderType}.title`) : 'No tools available'} | ||||
| </div> | </div> |