diff --git a/apps/dokploy/components/dashboard/project/add-template.tsx b/apps/dokploy/components/dashboard/project/add-template.tsx
index faee27ef..bc8929b2 100644
--- a/apps/dokploy/components/dashboard/project/add-template.tsx
+++ b/apps/dokploy/components/dashboard/project/add-template.tsx
@@ -308,7 +308,7 @@ export const AddTemplate = ({ projectId }: Props) => {
{/* Create Button */}
{
href={`/dashboard/project/${project.projectId}`}
>
-
-
+ {project.applications.length > 0 ||
+ project.compose.length > 0 ? (
+
+
+
+
+ e.stopPropagation()}
+ >
+ {project.applications.length > 0 && (
+
+
+ Applications
+
+ {project.applications.map((app) => (
+
+
+
+
+ {app.name}
+
+
+ {app.domains.map((domain) => (
+
+
+ {domain.host}
+
+
+
+ ))}
+
+
+ ))}
+
+ )}
+ {project.compose.length > 0 && (
+
+
+ Compose
+
+ {project.compose.map((comp) => (
+
+
+
+
+ {comp.name}
+
+
+ {comp.domains.map((domain) => (
+
+
+ {domain.host}
+
+
+
+ ))}
+
+
+ ))}
+
+ )}
+
+
+ ) : null}
@@ -182,7 +261,10 @@ export const ShowProjects = () => {
-
+ e.stopPropagation()}
+ >
Actions
diff --git a/apps/dokploy/components/dashboard/settings/ssh-keys/handle-ssh-keys.tsx b/apps/dokploy/components/dashboard/settings/ssh-keys/handle-ssh-keys.tsx
index f100979e..fc48134a 100644
--- a/apps/dokploy/components/dashboard/settings/ssh-keys/handle-ssh-keys.tsx
+++ b/apps/dokploy/components/dashboard/settings/ssh-keys/handle-ssh-keys.tsx
@@ -22,7 +22,7 @@ import { Textarea } from "@/components/ui/textarea";
import { sshKeyCreate, type sshKeyType } from "@/server/db/validations";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { PenBoxIcon, PlusIcon } from "lucide-react";
+import { DownloadIcon, PenBoxIcon, PlusIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
@@ -111,6 +111,26 @@ export const HandleSSHKeys = ({ sshKeyId }: Props) => {
toast.error("Error generating the SSH Key");
});
+ const downloadKey = (
+ content: string,
+ defaultFilename: string,
+ keyType: "private" | "public",
+ ) => {
+ const keyName = form.watch("name");
+ const filename = keyName
+ ? `${keyName}${sshKeyId ? `_${sshKeyId}` : ""}_${keyType}_${defaultFilename}`
+ : `${keyType}_${defaultFilename}`;
+ const blob = new Blob([content], { type: "text/plain" });
+ const url = window.URL.createObjectURL(blob);
+ const a = document.createElement("a");
+ a.href = url;
+ a.download = filename;
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ window.URL.revokeObjectURL(url);
+ };
+
return (