Skip to content

Commit

Permalink
fix webhook URL UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Dec 12, 2024
1 parent de39057 commit 9cc9579
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions autogpt_platform/frontend/src/components/CustomNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,21 @@ export function CustomNode({
<div>
{data.uiType === BlockUIType.WEBHOOK_MANUAL &&
(data.webhook ? (
<p className="nodrag">
Webhook URL: <br />
<code className="select-all">{data.webhook.url}</code>
</p>
<div className="nodrag flex flex-col gap-1 mr-5">
Webhook URL:
<div className="flex gap-2 rounded-md bg-gray-50 p-2">
<code className="select-all text-sm">{data.webhook.url}</code>
<Button
variant="outline"
size="icon"
className="size-7 flex-none"
onClick={() => data.webhook && navigator.clipboard.writeText(data.webhook.url)}
title="Copy webhook URL"
>
<CopyIcon className="size-4" />
</Button>
</div>
</div>
) : (
<p className="italic text-gray-500">
(A Webhook URL will be generated when you save the agent)
Expand Down

0 comments on commit 9cc9579

Please sign in to comment.