From 777980618fcf12eb20ac9c52b1e0162d1f249dfb Mon Sep 17 00:00:00 2001 From: Ali Issa Date: Fri, 31 Jan 2025 02:59:23 -0500 Subject: [PATCH] fix: improve domains page UX and button placement consistency --- .../application/domains/show-domains.tsx | 97 ++++++++------- .../compose/domains/show-domains.tsx | 112 +++++++++--------- 2 files changed, 107 insertions(+), 102 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/domains/show-domains.tsx b/apps/dokploy/components/dashboard/application/domains/show-domains.tsx index 21b7a9f50..809cb5a73 100644 --- a/apps/dokploy/components/dashboard/application/domains/show-domains.tsx +++ b/apps/dokploy/components/dashboard/application/domains/show-domains.tsx @@ -7,7 +7,6 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { Input } from "@/components/ui/input"; import { api } from "@/utils/api"; import { ExternalLink, GlobeIcon, PenBoxIcon, Trash2 } from "lucide-react"; import Link from "next/link"; @@ -74,64 +73,64 @@ export const ShowDomains = ({ applicationId }: Props) => { return (
- + {item.host} + - - - - -
- - - - { - await deleteDomain({ - domainId: item.domainId, - }) - .then((data) => { - refetch(); - toast.success("Domain deleted successfully"); + + + { + await deleteDomain({ + domainId: item.domainId, }) - .catch(() => { - toast.error("Error deleting domain"); - }); - }} - > - - + + +
); diff --git a/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx b/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx index c524d4431..e30776d83 100644 --- a/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx +++ b/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx @@ -7,7 +7,6 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { Input } from "@/components/ui/input"; import { api } from "@/utils/api"; import { ExternalLink, GlobeIcon, PenBoxIcon, Trash2 } from "lucide-react"; import Link from "next/link"; @@ -74,63 +73,70 @@ export const ShowDomainsCompose = ({ composeId }: Props) => { return (
- - - - - - - - -
- + + {item.serviceName} + + + -
+ +
+
+ {item.path} + {item.port} + {item.https ? "HTTPS" : "HTTP"} +
+ +
+ - - - - { - await deleteDomain({ - domainId: item.domainId, - }) - .then((data) => { - refetch(); - toast.success("Domain deleted successfully"); + + + { + await deleteDomain({ + domainId: item.domainId, }) - .catch(() => { - toast.error("Error deleting domain"); - }); - }} - > - - + + +
);