fix: wrap ssh host json export in hosts array

This commit is contained in:
LukeGus
2025-12-22 02:09:45 -06:00
parent 28729e3de2
commit a73f767072
4 changed files with 76 additions and 53 deletions

View File

@@ -363,7 +363,12 @@ export function HostManagerViewer({ onEditHost }: SSHManagerHostViewerProps) {
),
);
const blob = new Blob([JSON.stringify(cleanExportData, null, 2)], {
// Wrap in hosts array for valid import format
const exportFormat = {
hosts: [cleanExportData],
};
const blob = new Blob([JSON.stringify(exportFormat, null, 2)], {
type: "application/json",
});
const url = URL.createObjectURL(blob);