mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 17:35:56 +08:00
fix title & description of tool provider
This commit is contained in:
parent
973cd126bb
commit
5e3160e6f6
@ -1,6 +1,5 @@
|
|||||||
'use client'
|
'use client'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { useContext } from 'use-context-selector'
|
|
||||||
import { RiVerifiedBadgeLine } from '@remixicon/react'
|
import { RiVerifiedBadgeLine } from '@remixicon/react'
|
||||||
import type { Plugin } from '../types'
|
import type { Plugin } from '../types'
|
||||||
import Icon from '../card/base/card-icon'
|
import Icon from '../card/base/card-icon'
|
||||||
@ -10,7 +9,7 @@ import OrgInfo from './base/org-info'
|
|||||||
import Description from './base/description'
|
import Description from './base/description'
|
||||||
import Placeholder from './base/placeholder'
|
import Placeholder from './base/placeholder'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
import I18n from '@/context/i18n'
|
import { useGetLanguage } from '@/context/i18n'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
className?: string
|
className?: string
|
||||||
@ -35,7 +34,7 @@ const Card = ({
|
|||||||
isLoading = false,
|
isLoading = false,
|
||||||
loadingFileName,
|
loadingFileName,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const { locale } = useContext(I18n)
|
const locale = useGetLanguage()
|
||||||
|
|
||||||
const { type, name, org, label, brief, icon } = payload
|
const { type, name, org, label, brief, icon } = payload
|
||||||
|
|
||||||
|
@ -9,10 +9,7 @@ import { useTabSearchParams } from '@/hooks/use-tab-searchparams'
|
|||||||
import TabSliderNew from '@/app/components/base/tab-slider-new'
|
import TabSliderNew from '@/app/components/base/tab-slider-new'
|
||||||
import LabelFilter from '@/app/components/tools/labels/filter'
|
import LabelFilter from '@/app/components/tools/labels/filter'
|
||||||
import SearchInput from '@/app/components/base/search-input'
|
import SearchInput from '@/app/components/base/search-input'
|
||||||
import { DotsGrid } from '@/app/components/base/icons/src/vender/line/general'
|
// import CustomCreateCard from '@/app/components/tools/provider/custom-create-card'
|
||||||
import { Colors } from '@/app/components/base/icons/src/vender/line/others'
|
|
||||||
import { Route } from '@/app/components/base/icons/src/vender/line/mapsAndTravel'
|
|
||||||
import CustomCreateCard from '@/app/components/tools/provider/custom-create-card'
|
|
||||||
import ProviderDetail from '@/app/components/tools/provider/detail'
|
import ProviderDetail from '@/app/components/tools/provider/detail'
|
||||||
import Empty from '@/app/components/tools/add-tool-modal/empty'
|
import Empty from '@/app/components/tools/add-tool-modal/empty'
|
||||||
import { fetchCollectionList } from '@/service/tools'
|
import { fetchCollectionList } from '@/service/tools'
|
||||||
@ -31,9 +28,9 @@ const ProviderList = () => {
|
|||||||
defaultTab: 'builtin',
|
defaultTab: 'builtin',
|
||||||
})
|
})
|
||||||
const options = [
|
const options = [
|
||||||
{ value: 'builtin', text: t('tools.type.builtIn'), icon: <DotsGrid className='w-[14px] h-[14px] mr-1' /> },
|
{ value: 'builtin', text: t('tools.type.builtIn') },
|
||||||
{ value: 'api', text: t('tools.type.custom'), icon: <Colors className='w-[14px] h-[14px] mr-1' /> },
|
{ value: 'api', text: t('tools.type.custom') },
|
||||||
{ value: 'workflow', text: t('tools.type.workflow'), icon: <Route className='w-[14px] h-[14px] mr-1' /> },
|
{ value: 'workflow', text: t('tools.type.workflow') },
|
||||||
]
|
]
|
||||||
const [tagFilterValue, setTagFilterValue] = useState<string[]>([])
|
const [tagFilterValue, setTagFilterValue] = useState<string[]>([])
|
||||||
const handleTagsChange = (value: string[]) => {
|
const handleTagsChange = (value: string[]) => {
|
||||||
@ -100,7 +97,7 @@ const ProviderList = () => {
|
|||||||
'relative grid content-start grid-cols-1 gap-4 px-12 pt-2 pb-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 grow shrink-0',
|
'relative grid content-start grid-cols-1 gap-4 px-12 pt-2 pb-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 grow shrink-0',
|
||||||
currentProvider && 'pr-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
currentProvider && 'pr-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
||||||
)}>
|
)}>
|
||||||
{activeTab === 'api' && <CustomCreateCard onRefreshData={getProviderList} />}
|
{/* {activeTab === 'api' && <CustomCreateCard onRefreshData={getProviderList} />} */}
|
||||||
{filteredCollectionList.map(collection => (
|
{filteredCollectionList.map(collection => (
|
||||||
<div
|
<div
|
||||||
key={collection.id}
|
key={collection.id}
|
||||||
|
@ -4,7 +4,7 @@ const translation = {
|
|||||||
customToolTip: 'Learn more about Dify custom tools',
|
customToolTip: 'Learn more about Dify custom tools',
|
||||||
type: {
|
type: {
|
||||||
all: 'All',
|
all: 'All',
|
||||||
builtIn: 'Built-in',
|
builtIn: 'Tools',
|
||||||
custom: 'Custom',
|
custom: 'Custom',
|
||||||
workflow: 'Workflow',
|
workflow: 'Workflow',
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,7 @@ const translation = {
|
|||||||
customToolTip: '了解更多关于 Dify 自定义工具的信息',
|
customToolTip: '了解更多关于 Dify 自定义工具的信息',
|
||||||
type: {
|
type: {
|
||||||
all: '全部',
|
all: '全部',
|
||||||
builtIn: '内置',
|
builtIn: '工具',
|
||||||
custom: '自定义',
|
custom: '自定义',
|
||||||
workflow: '工作流',
|
workflow: '工作流',
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user