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:
alphaeusmote
2025-04-11 15:46:27 +00:00
+30 -33
View File
@@ -459,39 +459,9 @@ export function DomainDetails({ domain, onBack }: DomainDetailsProps) {
<TableCell> <TableCell>
<Badge variant="outline">{record.type}</Badge> <Badge variant="outline">{record.type}</Badge>
</TableCell> </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>
</TableCell>
<TableCell> <TableCell>
{record.isAutoIP ? ( {record.isAutoIP ? (
<div className="flex items-center gap-2"> record.currentIp ? (
<Badge variant="outline" className="bg-blue-50 text-blue-600 border-blue-200">
Enabled
</Badge>
{record.currentIp && (
<TooltipProvider> <TooltipProvider>
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>
@@ -509,7 +479,7 @@ export function DomainDetails({ domain, onBack }: DomainDetailsProps) {
}} }}
> >
<span className="flex items-center gap-1"> <span className="flex items-center gap-1">
{record.currentIp.substring(0, 10)}... {record.currentIp.substring(0, 12)}...
<Copy className="h-3 w-3" /> <Copy className="h-3 w-3" />
</span> </span>
</Button> </Button>
@@ -520,8 +490,35 @@ export function DomainDetails({ domain, onBack }: DomainDetailsProps) {
</TooltipContent> </TooltipContent>
</Tooltip> </Tooltip>
</TooltipProvider> </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>
</>
)} )}
</div> </TooltipContent>
</Tooltip>
</TooltipProvider>
)}
</TableCell>
<TableCell>
{record.isAutoIP ? (
<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"> <Badge variant="outline" className="bg-gray-50 text-gray-500 border-gray-200">
Disabled Disabled