diff --git a/apps/dokploy/components/dashboard/settings/dns/dns-page-transition.tsx b/apps/dokploy/components/dashboard/settings/dns/dns-page-transition.tsx deleted file mode 100644 index 20accf405..000000000 --- a/apps/dokploy/components/dashboard/settings/dns/dns-page-transition.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { useRouter } from "next/router"; -import { useEffect, useState } from "react"; - -let lastDepth: number | null = null; - -const depthOf = (path: string) => - path.split("?")[0]!.split("/").filter(Boolean).length; - -export const DnsPageTransition = ({ - children, -}: { - children: React.ReactNode; -}) => { - const { asPath } = useRouter(); - const depth = depthOf(asPath); - const [direction] = useState(() => - lastDepth !== null && depth < lastDepth ? "back" : "forward", - ); - - useEffect(() => { - lastDepth = depth; - }, [depth]); - - return ( -
- {children} -
- ); -}; diff --git a/apps/dokploy/components/dashboard/settings/dns/show-dns-providers.tsx b/apps/dokploy/components/dashboard/settings/dns/show-dns-providers.tsx index 4d511ff35..c95d7dbda 100644 --- a/apps/dokploy/components/dashboard/settings/dns/show-dns-providers.tsx +++ b/apps/dokploy/components/dashboard/settings/dns/show-dns-providers.tsx @@ -1,4 +1,4 @@ -import { EyeIcon, Globe, Trash2 } from "lucide-react"; +import { EyeIcon, Globe, Loader2, Trash2 } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; import { toast } from "sonner"; @@ -12,7 +12,6 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { Skeleton } from "@/components/ui/skeleton"; import { Tooltip, TooltipContent, @@ -33,7 +32,7 @@ export const ShowDnsProviders = () => { const { data: permissions } = api.user.getPermissions.useQuery(); return ( -
+
@@ -52,10 +51,9 @@ export const ShowDnsProviders = () => { {isPending ? ( -
- {[0, 1, 2].map((row) => ( - - ))} +
+ Loading... +
) : data?.length === 0 ? (
diff --git a/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx b/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx index 57129452e..1264b6696 100644 --- a/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx +++ b/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx @@ -14,6 +14,7 @@ import { Cloud, CloudOff, ListTree, + Loader2, PenBoxIcon, PlusIcon, Search, @@ -40,7 +41,6 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { Skeleton } from "@/components/ui/skeleton"; import { Table, TableBody, @@ -319,7 +319,7 @@ export const ShowDnsRecords = ({ dnsProviderId, zoneId }: Props) => { }); return ( -
+
@@ -358,7 +358,10 @@ export const ShowDnsRecords = ({ dnsProviderId, zoneId }: Props) => {
{isPending ? ( - +
+ Loading... + +
) : data?.length === 0 ? (
diff --git a/apps/dokploy/components/dashboard/settings/dns/show-dns-zones.tsx b/apps/dokploy/components/dashboard/settings/dns/show-dns-zones.tsx index 839c2083b..f395018b2 100644 --- a/apps/dokploy/components/dashboard/settings/dns/show-dns-zones.tsx +++ b/apps/dokploy/components/dashboard/settings/dns/show-dns-zones.tsx @@ -1,4 +1,4 @@ -import { ArrowLeft, Globe } from "lucide-react"; +import { ArrowLeft, Globe, Loader2 } from "lucide-react"; import Link from "next/link"; import { AlertBlock } from "@/components/shared/alert-block"; import { Button } from "@/components/ui/button"; @@ -9,7 +9,6 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { Skeleton } from "@/components/ui/skeleton"; import { api } from "@/utils/api"; interface Props { @@ -29,7 +28,7 @@ const RecordCount = ({ }); if (isPending) { - return ; + return ; } if (isError) { @@ -53,7 +52,7 @@ export const ShowDnsZones = ({ dnsProviderId }: Props) => { api.dnsProvider.listZones.useQuery({ dnsProviderId }); return ( -
+
@@ -79,10 +78,9 @@ export const ShowDnsZones = ({ dnsProviderId }: Props) => { {isError && {error?.message}} {isPending ? ( -
- {[0, 1, 2, 3, 4, 5].map((card) => ( - - ))} +
+ Loading... +
) : data?.length === 0 ? (
diff --git a/apps/dokploy/pages/dashboard/settings/dns.tsx b/apps/dokploy/pages/dashboard/settings/dns.tsx index 0600117b1..ac0536de4 100644 --- a/apps/dokploy/pages/dashboard/settings/dns.tsx +++ b/apps/dokploy/pages/dashboard/settings/dns.tsx @@ -3,17 +3,12 @@ import { createServerSideHelpers } from "@trpc/react-query/server"; import type { GetServerSidePropsContext } from "next"; import type { ReactElement } from "react"; import superjson from "superjson"; -import { DnsPageTransition } from "@/components/dashboard/settings/dns/dns-page-transition"; import { ShowDnsProviders } from "@/components/dashboard/settings/dns/show-dns-providers"; import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { appRouter } from "@/server/api/root"; const Page = () => { - return ( - - - - ); + return ; }; export default Page; diff --git a/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId].tsx b/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId].tsx index 105b6d378..fb34001f7 100644 --- a/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId].tsx +++ b/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId].tsx @@ -3,7 +3,6 @@ import { createServerSideHelpers } from "@trpc/react-query/server"; import type { GetServerSidePropsContext } from "next"; import type { ReactElement } from "react"; import superjson from "superjson"; -import { DnsPageTransition } from "@/components/dashboard/settings/dns/dns-page-transition"; import { ShowDnsZones } from "@/components/dashboard/settings/dns/show-dns-zones"; import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { appRouter } from "@/server/api/root"; @@ -13,11 +12,7 @@ interface Props { } const Page = ({ dnsProviderId }: Props) => { - return ( - - - - ); + return ; }; export default Page; diff --git a/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId]/[zoneId].tsx b/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId]/[zoneId].tsx index c307738f1..b050789ab 100644 --- a/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId]/[zoneId].tsx +++ b/apps/dokploy/pages/dashboard/settings/dns/[dnsProviderId]/[zoneId].tsx @@ -3,7 +3,6 @@ import { createServerSideHelpers } from "@trpc/react-query/server"; import type { GetServerSidePropsContext } from "next"; import type { ReactElement } from "react"; import superjson from "superjson"; -import { DnsPageTransition } from "@/components/dashboard/settings/dns/dns-page-transition"; import { ShowDnsRecords } from "@/components/dashboard/settings/dns/show-dns-records"; import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { appRouter } from "@/server/api/root"; @@ -14,11 +13,7 @@ interface Props { } const Page = ({ dnsProviderId, zoneId }: Props) => { - return ( - - - - ); + return ; }; export default Page; diff --git a/packages/server/src/utils/process/execAsync.ts b/packages/server/src/utils/process/execAsync.ts index 81b12e2f9..37b0b7f91 100644 --- a/packages/server/src/utils/process/execAsync.ts +++ b/packages/server/src/utils/process/execAsync.ts @@ -75,7 +75,6 @@ export const execAsyncStream = ( command, stdout: stdoutComplete, stderr: stderrComplete, - // @ts-expect-error exitCode: error.code, originalError: error, }),