handleSortChange({ sortBy: option.value, sortOrder: option.order })}
>
{option.text}
diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
index 14e9abef9b..b2b04a6f1e 100644
--- a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
@@ -1,17 +1,19 @@
-import React, { useMemo, useState } from 'react'
+import React, { useEffect, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useBoolean } from 'ahooks'
-import { RiDeleteBinLine, RiEditLine, RiLoginCircleLine } from '@remixicon/react'
+import copy from 'copy-to-clipboard'
+import { RiClipboardLine, RiDeleteBinLine, RiEditLine, RiLoginCircleLine } from '@remixicon/react'
import type { EndpointListItem } from '../types'
import EndpointModal from './endpoint-modal'
import { NAME_FIELD } from './utils'
import { addDefaultValue, toolCredentialToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
+import { ClipboardCheck } from '@/app/components/base/icons/src/vender/line/files'
import ActionButton from '@/app/components/base/action-button'
-import CopyBtn from '@/app/components/base/copy-btn'
import Confirm from '@/app/components/base/confirm'
import Indicator from '@/app/components/header/indicator'
import Switch from '@/app/components/base/switch'
import Toast from '@/app/components/base/toast'
+import Tooltip from '@/app/components/base/tooltip'
import {
useDeleteEndpoint,
useDisableEndpoint,
@@ -111,6 +113,25 @@ const EndpointCard = ({
state,
})
+ const [isCopied, setIsCopied] = useState(false)
+ const handleCopy = (value: string) => {
+ copy(value)
+ setIsCopied(true)
+ }
+
+ useEffect(() => {
+ if (isCopied) {
+ const timer = setTimeout(() => {
+ setIsCopied(false)
+ }, 2000)
+ return () => {
+ clearTimeout(timer)
+ }
+ }
+ }, [isCopied])
+
+ const CopyIcon = isCopied ? ClipboardCheck : RiClipboardLine
+
return (
@@ -133,11 +154,11 @@ const EndpointCard = ({
{endpoint.method}
{`${data.url}${endpoint.path}`}
-
+
+ handleCopy(`${data.url}${endpoint.path}`)}>
+
+
+
))}
diff --git a/web/app/components/plugins/plugin-page/list/index.tsx b/web/app/components/plugins/plugin-page/list/index.tsx
index 57fea8c8b5..9e9cf00c9f 100644
--- a/web/app/components/plugins/plugin-page/list/index.tsx
+++ b/web/app/components/plugins/plugin-page/list/index.tsx
@@ -8,7 +8,7 @@ type IPluginListProps = {
const PluginList: FC
= ({ pluginList }) => {
return (
-
+
{pluginList.map(plugin => (
= ({
const { locale } = useI18N()
return (
-
+
{/* Header */}
@@ -61,7 +61,7 @@ const ProviderCard: FC
= ({
))}