mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-05 15:57:43 +00:00
Add copy IP button to domain details
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/eea8af3c-4b4c-47c8-9c7b-2c74fd45c59b.jpg
This commit is contained in:
@@ -460,68 +460,65 @@ export function DomainDetails({ domain, onBack }: DomainDetailsProps) {
|
||||
<Badge variant="outline">{record.type}</Badge>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span className="truncate max-w-[150px] inline-block">
|
||||
{record.isAutoIP
|
||||
? "Auto-managed"
|
||||
: record.content}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>
|
||||
{record.isAutoIP
|
||||
? "Content automatically managed by AutoIP"
|
||||
: record.content}
|
||||
</p>
|
||||
{record.notes && (
|
||||
<>
|
||||
<div className="border-t my-1"></div>
|
||||
<p className="italic text-xs">{record.notes}</p>
|
||||
</>
|
||||
)}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
{record.isAutoIP ? (
|
||||
record.currentIp ? (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 px-2 text-xs font-mono"
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(record.currentIp || '');
|
||||
toast({
|
||||
title: "IP copied to clipboard",
|
||||
description: record.currentIp,
|
||||
duration: 2000
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span className="flex items-center gap-1">
|
||||
{record.currentIp.substring(0, 12)}...
|
||||
<Copy className="h-3 w-3" />
|
||||
</span>
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p className="font-mono">{record.currentIp}</p>
|
||||
<p className="text-xs mt-1">Click to copy</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
) : (
|
||||
<span className="text-muted-foreground text-sm">Resolving IP...</span>
|
||||
)
|
||||
) : (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span className="truncate max-w-[150px] inline-block">
|
||||
{record.content}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>{record.content}</p>
|
||||
{record.notes && (
|
||||
<>
|
||||
<div className="border-t my-1"></div>
|
||||
<p className="italic text-xs">{record.notes}</p>
|
||||
</>
|
||||
)}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{record.isAutoIP ? (
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge variant="outline" className="bg-blue-50 text-blue-600 border-blue-200">
|
||||
Enabled
|
||||
</Badge>
|
||||
{record.currentIp && (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 px-2 text-xs font-mono"
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(record.currentIp || '');
|
||||
toast({
|
||||
title: "IP copied to clipboard",
|
||||
description: record.currentIp,
|
||||
duration: 2000
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span className="flex items-center gap-1">
|
||||
{record.currentIp.substring(0, 10)}...
|
||||
<Copy className="h-3 w-3" />
|
||||
</span>
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p className="font-mono">{record.currentIp}</p>
|
||||
<p className="text-xs mt-1">Click to copy</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
</div>
|
||||
<Badge variant="outline" className="bg-blue-50 text-blue-600 border-blue-200">
|
||||
Enabled
|
||||
</Badge>
|
||||
) : (
|
||||
<Badge variant="outline" className="bg-gray-50 text-gray-500 border-gray-200">
|
||||
Disabled
|
||||
|
||||
Reference in New Issue
Block a user