From 777980618fcf12eb20ac9c52b1e0162d1f249dfb Mon Sep 17 00:00:00 2001 From: Ali Issa Date: Fri, 31 Jan 2025 02:59:23 -0500 Subject: [PATCH 1/2] 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"); - }); - }} - > - - + + +
); From cd1c7e60bf5244000b9a4467154b946832f2842e Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:32:10 -0600 Subject: [PATCH 2/2] refactor: update domains --- .../dashboard/application/domains/show-domains.tsx | 6 ++++-- .../components/dashboard/compose/domains/show-domains.tsx | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/domains/show-domains.tsx b/apps/dokploy/components/dashboard/application/domains/show-domains.tsx index 809cb5a73..17dbc91f0 100644 --- a/apps/dokploy/components/dashboard/application/domains/show-domains.tsx +++ b/apps/dokploy/components/dashboard/application/domains/show-domains.tsx @@ -76,11 +76,13 @@ export const ShowDomains = ({ applicationId }: Props) => { className="flex w-full items-center justify-between gap-4 border p-4 md:px-6 rounded-lg flex-wrap" > - {item.host} + + {item.host} + diff --git a/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx b/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx index e30776d83..7bc451e00 100644 --- a/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx +++ b/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx @@ -76,16 +76,16 @@ export const ShowDomainsCompose = ({ composeId }: Props) => { className="flex w-full items-center justify-between gap-4 border p-4 md:px-6 rounded-lg flex-wrap" >
- + {item.serviceName} - {item.host} + {item.host}