@@ -4,7 +4,6 @@ import { useIntl } from "react-intl";
44import {
55 Activity ,
66 Box ,
7- Copy ,
87 Globe ,
98 Loader2 ,
109 MessageSquareCode ,
@@ -20,12 +19,12 @@ import {
2019} from "@/components/common/VisibilityInfoPopover" ;
2120import { Badge } from "@/components/ui/badge" ;
2221import { Button } from "@/components/ui/button" ;
22+ import { CopyButton } from "@/components/ui/copy-button" ;
2323import { InlineTagAdd } from "@/components/ui/inline-tag-add" ;
2424import { CopyValue } from "@/components/ui/copy-value" ;
2525import { Input } from "@/components/ui/input" ;
2626import { cn } from "@/lib/utils" ;
2727import type { MCPServer as BaseMCPServer , VirtualServerTag } from "@/types/server" ;
28- import { copyToClipboard } from "@/lib/clipboard" ;
2928import { useQuery } from "@/hooks/useQuery" ;
3029import { TestConnectionPanel } from "./TestConnectionPanel" ;
3130import { Tabs , TabsContent , TabsList , TabsTrigger } from "@/components/ui/tabs" ;
@@ -489,32 +488,28 @@ export function MCPServerDetailsPanel({
489488 </ span >
490489 < span className = "flex min-w-0 items-center gap-2 font-mono text-[13px] text-muted-foreground" >
491490 < span className = "truncate" > { identifier } </ span >
492- < Button
493- type = "button"
494- variant = "ghost"
495- size = "icon-xs"
496- aria-label = { `Copy ${ title } ` }
491+ < CopyButton
492+ value = { identifier }
493+ label = { intl . formatMessage (
494+ { id : "common.copyValue" } ,
495+ { label : title } ,
496+ ) }
497497 className = "size-5 text-muted-foreground"
498- onClick = { ( ) => copyToClipboard ( identifier ) }
499- >
500- < Copy className = "size-3.5" />
501- </ Button >
498+ />
502499 </ span >
503500 </ >
504501 ) : (
505502 < >
506503 < span className = "flex min-w-0 items-center gap-2 font-mono text-[13px] text-muted-foreground" >
507504 < span className = "truncate" > { identifier } </ span >
508- < Button
509- type = "button"
510- variant = "ghost"
511- size = "icon-xs"
512- aria-label = { `Copy ${ identifier } ` }
505+ < CopyButton
506+ value = { identifier }
507+ label = { intl . formatMessage (
508+ { id : "common.copyValue" } ,
509+ { label : identifier } ,
510+ ) }
513511 className = "size-5 text-muted-foreground"
514- onClick = { ( ) => copyToClipboard ( identifier ) }
515- >
516- < Copy className = "size-3.5" />
517- </ Button >
512+ />
518513 </ span >
519514 < span aria-hidden = "true" />
520515 </ >
0 commit comments