diff --git a/apps/web/components/profile/settings-api-keys-tab.tsx b/apps/web/components/profile/settings-api-keys-tab.tsx index 12df467..dadde7f 100644 --- a/apps/web/components/profile/settings-api-keys-tab.tsx +++ b/apps/web/components/profile/settings-api-keys-tab.tsx @@ -13,6 +13,7 @@ import { EyeOff, Clock, AlertCircle, + Download, } from "lucide-react" import { motion, AnimatePresence } from "motion/react" @@ -187,6 +188,27 @@ export function SettingsApiKeysTab() { } } + const handleDownloadConfig = () => { + if (!createdKey?.key) return + const config = { + apiKey: createdKey.key, + exportPath: "/home/deck/Downloads", + baseUrl: "https://deckyvault.xyz", + hardwareSlug: null, + } + const blob = new Blob([JSON.stringify(config, null, 2)], { + type: "application/json", + }) + const url = URL.createObjectURL(blob) + const a = document.createElement("a") + a.href = url + a.download = "deckyvault-config.json" + document.body.appendChild(a) + a.click() + document.body.removeChild(a) + URL.revokeObjectURL(url) + } + // Show the created key modal @@ -261,6 +283,14 @@ export function SettingsApiKeysTab() { > Done + + )