| | |
| | | import { useDebounceFn } from 'ahooks' |
| | | import { |
| | | RiApps2Line, |
| | | RiExchange2Line, |
| | | RiMessage3Line, |
| | | RiRobot3Line, |
| | | } from '@remixicon/react' |
| | | import AppCard from './AppCard' |
| | | import NewAppCard from './NewAppCard' |
| | |
| | | import { useStore as useTagStore } from '@/app/components/base/tag-management/store' |
| | | import TagManagementModal from '@/app/components/base/tag-management' |
| | | import TagFilter from '@/app/components/base/tag-management/filter' |
| | | import CheckboxWithLabel from '@/app/components/datasets/create/website/base/checkbox-with-label' |
| | | // import CheckboxWithLabel from '@/app/components/datasets/create/website/base/checkbox-with-label' |
| | | |
| | | const getKey = ( |
| | | pageIndex: number, |
| | |
| | | keywords: string, |
| | | ) => { |
| | | if (!pageIndex || previousPageData.has_more) { |
| | | const params: any = { url: 'apps', params: { page: pageIndex + 1, limit: 30, name: keywords, is_created_by_me: isCreatedByMe } } |
| | | const params: any = { url: 'apps', params: { page: pageIndex + 1, limit: 30, name: keywords, is_created_by_me: true } } |
| | | |
| | | if (activeTab !== 'all') |
| | | params.params.mode = activeTab |
| | |
| | | const anchorRef = useRef<HTMLDivElement>(null) |
| | | const options = [ |
| | | { value: 'all', text: t('app.types.all'), icon: <RiApps2Line className='w-[14px] h-[14px] mr-1' /> }, |
| | | { value: 'chat', text: t('app.types.chatbot'), icon: <RiMessage3Line className='w-[14px] h-[14px] mr-1' /> }, |
| | | { value: 'agent-chat', text: t('app.types.agent'), icon: <RiRobot3Line className='w-[14px] h-[14px] mr-1' /> }, |
| | | { value: 'workflow', text: t('app.types.workflow'), icon: <RiExchange2Line className='w-[14px] h-[14px] mr-1' /> }, |
| | | // { value: 'chat', text: t('app.types.chatbot'), icon: <RiMessage3Line className='w-[14px] h-[14px] mr-1' /> }, |
| | | // { value: 'agent-chat', text: t('app.types.agent'), icon: <RiRobot3Line className='w-[14px] h-[14px] mr-1' /> }, |
| | | // { value: 'workflow', text: t('app.types.workflow'), icon: <RiExchange2Line className='w-[14px] h-[14px] mr-1' /> }, |
| | | ] |
| | | |
| | | useEffect(() => { |
| | |
| | | options={options} |
| | | /> |
| | | <div className='flex items-center gap-2'> |
| | | <CheckboxWithLabel |
| | | {/* <CheckboxWithLabel |
| | | className='mr-2' |
| | | label={t('app.showMyCreatedAppsOnly')} |
| | | isChecked={isCreatedByMe} |
| | | onChange={() => setIsCreatedByMe(!isCreatedByMe)} |
| | | /> |
| | | /> */} |
| | | <TagFilter type='app' value={tagFilterValue} onChange={handleTagsChange} /> |
| | | <Input |
| | | showLeftIcon |