diff --git a/app/lib/stores/workbench.ts b/app/lib/stores/workbench.ts index c42cc6275..107ef16d4 100644 --- a/app/lib/stores/workbench.ts +++ b/app/lib/stores/workbench.ts @@ -278,6 +278,7 @@ export class WorkbenchStore { async downloadZip() { const zip = new JSZip(); const files = this.files.get(); + const projectName = prompt('Enter the project name:', 'project') || 'project'; for (const [filePath, dirent] of Object.entries(files)) { if (dirent?.type === 'file' && !dirent.isBinary) { @@ -303,7 +304,7 @@ export class WorkbenchStore { } const content = await zip.generateAsync({ type: 'blob' }); - saveAs(content, 'project.zip'); + saveAs(content, `${projectName}.zip`); } async syncFiles(targetHandle: FileSystemDirectoryHandle) {