diff --git a/src/app/[orgId]/settings/logs/streaming/page.tsx b/src/app/[orgId]/settings/logs/streaming/page.tsx index 265001e8e..c732274b4 100644 --- a/src/app/[orgId]/settings/logs/streaming/page.tsx +++ b/src/app/[orgId]/settings/logs/streaming/page.tsx @@ -7,6 +7,7 @@ import { useEnvContext } from "@app/hooks/useEnvContext"; import { toast } from "@app/hooks/useToast"; import { usePaidStatus } from "@app/hooks/usePaidStatus"; import { PaidFeaturesAlert } from "@app/components/PaidFeaturesAlert"; +import ConfirmDeleteDialog from "@app/components/ConfirmDeleteDialog"; import { tierMatrix, TierFeature } from "@server/lib/billing/tierMatrix"; import SettingsSectionTitle from "@app/components/SettingsSectionTitle"; import { @@ -23,15 +24,10 @@ import { Button } from "@app/components/ui/button"; import { Input } from "@app/components/ui/input"; import { Label } from "@app/components/ui/label"; import { Switch } from "@app/components/ui/switch"; -import { - Tabs, - TabsContent, - TabsList, - TabsTrigger -} from "@app/components/ui/tabs"; +import { HorizontalTabs } from "@app/components/HorizontalTabs"; import { RadioGroup, RadioGroupItem } from "@app/components/ui/radio-group"; import { Textarea } from "@app/components/ui/textarea"; -import { Globe, Plus, Pencil, Trash2, X } from "lucide-react"; +import { Globe, Plus, Trash2, X } from "lucide-react"; import { AxiosResponse } from "axios"; import { build } from "@server/build"; @@ -217,15 +213,14 @@ function DestinationCard({

{/* Footer: edit button */} -
+
@@ -286,13 +281,15 @@ function DestinationModal({ const [saving, setSaving] = useState(false); const [deleting, setDeleting] = useState(false); - const [confirmDelete, setConfirmDelete] = useState(false); + const [deleteDialogOpen, setDeleteDialogOpen] = useState(false); const [cfg, setCfg] = useState(defaultConfig()); useEffect(() => { if (open) { setCfg(editing ? parseConfig(editing.config) : defaultConfig()); - setConfirmDelete(false); + } + if (!open) { + setDeleteDialogOpen(false); } }, [open, editing]); @@ -343,10 +340,6 @@ function DestinationModal({ async function handleDelete() { if (!editing) return; - if (!confirmDelete) { - setConfirmDelete(true); - return; - } setDeleting(true); try { await api.delete( @@ -370,6 +363,7 @@ function DestinationModal({ } return ( + <> @@ -384,15 +378,16 @@ function DestinationModal({ - - - Settings - Headers - Body Template - - + {/* ── Settings ─────────────────────────────────── */} - +
- +
{/* ── Headers ───────────────────────────────────── */} - +

Custom HTTP Headers @@ -621,10 +616,10 @@ function DestinationModal({ onChange={(headers) => update({ headers })} />

- +
{/* ── Body Template ─────────────────────────────── */} - +

Custom Body Template @@ -676,8 +671,8 @@ function DestinationModal({

)} - - +
+
@@ -685,13 +680,12 @@ function DestinationModal({ )} @@ -714,6 +708,27 @@ function DestinationModal({
+ + {editing && ( + + Are you sure you want to delete the destination{" "} + + {parseConfig(editing.config).name || "this destination"} + + ? All configuration will be permanently removed. +

+ } + buttonText="Delete Destination" + onConfirm={handleDelete} + /> + )} + ); }