mirror of
https://github.com/langgenius/dify.git
synced 2026-08-28 21:23:22 +08:00
tooltip of endpoints
This commit is contained in:
parent
1dc2d7f4a2
commit
f0e4885926
@ -1,7 +1,11 @@
|
|||||||
import React, { useMemo } from 'react'
|
import React, { useMemo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
import { RiAddLine } from '@remixicon/react'
|
import {
|
||||||
|
RiAddLine,
|
||||||
|
RiApps2AddLine,
|
||||||
|
RiBookOpenLine,
|
||||||
|
} from '@remixicon/react'
|
||||||
import EndpointModal from './endpoint-modal'
|
import EndpointModal from './endpoint-modal'
|
||||||
import EndpointCard from './endpoint-card'
|
import EndpointCard from './endpoint-card'
|
||||||
import { NAME_FIELD } from './utils'
|
import { NAME_FIELD } from './utils'
|
||||||
@ -61,8 +65,26 @@ const EndpointList = ({ showTopBorder }: Props) => {
|
|||||||
<div className='flex items-center gap-0.5'>
|
<div className='flex items-center gap-0.5'>
|
||||||
{t('plugin.detailPanel.endpoints')}
|
{t('plugin.detailPanel.endpoints')}
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
needsDelay
|
||||||
|
popupClassName='w-[240px] p-4 rounded-xl bg-components-panel-bg-blur border-[0.5px] border-components-panel-border'
|
||||||
popupContent={
|
popupContent={
|
||||||
<div className='w-[180px]'>TODO</div>
|
<div className='flex flex-col gap-2'>
|
||||||
|
<div className='w-8 h-8 flex items-center justify-center bg-background-default-subtle rounded-lg border-[0.5px] border-components-panel-border-subtle'>
|
||||||
|
<RiApps2AddLine className='w-4 h-4 text-text-tertiary' />
|
||||||
|
</div>
|
||||||
|
<div className='text-text-tertiary system-xs-regular'>{t('plugin.detailPanel.endpointsTip')}</div>
|
||||||
|
{/* TODO endpoints doc link */}
|
||||||
|
<a
|
||||||
|
href=''
|
||||||
|
target='_blank'
|
||||||
|
rel='noopener noreferrer'
|
||||||
|
>
|
||||||
|
<div className='inline-flex items-center gap-1 text-text-accent system-xs-regular cursor-pointer'>
|
||||||
|
<RiBookOpenLine className='w-3 h-3' />
|
||||||
|
{t('plugin.detailPanel.endpointsDocLink')}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -50,6 +50,8 @@ const translation = {
|
|||||||
},
|
},
|
||||||
actionNum: '{{num}} ACTIONS INCLUDED',
|
actionNum: '{{num}} ACTIONS INCLUDED',
|
||||||
endpoints: 'Endpoints',
|
endpoints: 'Endpoints',
|
||||||
|
endpointsTip: 'This plugin provides specific functionalities via endpoints, and you can configure multiple endpoint sets for current workspace.',
|
||||||
|
endpointsDocLink: 'View the document',
|
||||||
endpointsEmpty: 'Click the \'+\' button to add an endpoint',
|
endpointsEmpty: 'Click the \'+\' button to add an endpoint',
|
||||||
endpointDisableTip: 'Disable Endpoint',
|
endpointDisableTip: 'Disable Endpoint',
|
||||||
endpointDisableContent: 'Would you like to disable {{name}}? ',
|
endpointDisableContent: 'Would you like to disable {{name}}? ',
|
||||||
|
|||||||
@ -49,14 +49,16 @@ const translation = {
|
|||||||
remove: '移除',
|
remove: '移除',
|
||||||
},
|
},
|
||||||
actionNum: '{{num}} ACTIONS 已包含',
|
actionNum: '{{num}} ACTIONS 已包含',
|
||||||
endpoints: 'Endpoints',
|
endpoints: 'API 端点',
|
||||||
endpointsEmpty: '点击 \'+\' 按钮添加 Endpoint',
|
endpointsTip: '此插件通过 API 端点提供特定功能,您可以为当前工作区配置多个 API 端点集。',
|
||||||
endpointDisableTip: '停用 Endpoint',
|
endpointsDocLink: '查看文档',
|
||||||
endpointDisableContent: '是否要停用 {{name}} 的 Endpoint ?',
|
endpointsEmpty: '点击 \'+\' 按钮添加 API 端点',
|
||||||
endpointDeleteTip: '移除 Endpoint',
|
endpointDisableTip: '停用 API 端点',
|
||||||
|
endpointDisableContent: '是否要停用 {{name}} 的 API 端点 ?',
|
||||||
|
endpointDeleteTip: '移除 API 端点',
|
||||||
endpointDeleteContent: '是否要移除 {{name}} ?',
|
endpointDeleteContent: '是否要移除 {{name}} ?',
|
||||||
endpointModalTitle: '设置 Endpoint',
|
endpointModalTitle: '设置 API 端点',
|
||||||
endpointModalDesc: '配置表单后,工作区内的所有成员都可以在编排应用时使用此端点。',
|
endpointModalDesc: '配置表单后,工作区内的所有成员都可以在编排应用时使用此 API 端点。',
|
||||||
serviceOk: '服务正常',
|
serviceOk: '服务正常',
|
||||||
disabled: '停用',
|
disabled: '停用',
|
||||||
modelNum: '{{num}} 模型已包含',
|
modelNum: '{{num}} 模型已包含',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user