mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-29 06:10:47 +00:00
Add copy to clip
This commit is contained in:
@@ -699,24 +699,24 @@ export default function GeneralPage() {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 text-xs">
|
||||
<div>
|
||||
{/* <div>
|
||||
<strong>User Agent:</strong>
|
||||
<p className="text-muted-foreground mt-1 break-all">
|
||||
{row.userAgent || "N/A"}
|
||||
</p>
|
||||
</div>
|
||||
</div> */}
|
||||
<div>
|
||||
<strong>Original URL:</strong>
|
||||
<p className="text-muted-foreground mt-1 break-all">
|
||||
{row.originalRequestURL || "N/A"}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
{/* <div>
|
||||
<strong>Scheme:</strong>
|
||||
<p className="text-muted-foreground mt-1">
|
||||
{row.scheme || "N/A"}
|
||||
</p>
|
||||
</div>
|
||||
</div> */}
|
||||
<div>
|
||||
<strong>Metadata:</strong>
|
||||
<pre className="text-muted-foreground mt-1 text-xs bg-background p-2 rounded border overflow-auto">
|
||||
|
||||
@@ -4,6 +4,7 @@ import { ColumnDef } from "@tanstack/react-table";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Badge } from "@app/components/ui/badge";
|
||||
import { DNSRecordsDataTable } from "./DNSRecordsDataTable";
|
||||
import CopyToClipboard from "@app/components/CopyToClipboard";
|
||||
|
||||
export type DNSRecordRow = {
|
||||
id: string;
|
||||
@@ -39,7 +40,15 @@ export default function DNSRecordsTable({
|
||||
},
|
||||
cell: ({ row }) => {
|
||||
const baseDomain = row.original.baseDomain;
|
||||
return <div>{baseDomain || "-"}</div>;
|
||||
return baseDomain ? (
|
||||
<CopyToClipboard
|
||||
text={baseDomain}
|
||||
displayText={baseDomain}
|
||||
isLink={false}
|
||||
/>
|
||||
) : (
|
||||
<div>-</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -68,7 +77,13 @@ export default function DNSRecordsTable({
|
||||
},
|
||||
cell: ({ row }) => {
|
||||
const value = row.original.value;
|
||||
return <div>{value}</div>;
|
||||
return (
|
||||
<CopyToClipboard
|
||||
text={value}
|
||||
displayText={value}
|
||||
isLink={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user