Skip to content

Commit 8dfa55b

Browse files
committed
Update experimental/template
1 parent 0fefbce commit 8dfa55b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
1 Byte
Binary file not shown.

experimental/template/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,11 @@
253253
throw new Error(zipData.error);
254254
}
255255

256-
// Create a download link for the ZIP file
256+
// Create a download link for the ZIP file with template_name_project_name format
257257
const downloadLink = document.createElement("a");
258258
downloadLink.href = "data:" + zipData.type + ";base64," + zipData.data;
259-
downloadLink.download = templateName + ".zip";
259+
const projectName = params.project_name || "project";
260+
downloadLink.download = `${templateName}_${projectName}.zip`;
260261

261262
// Append to body, click, and remove
262263
document.body.appendChild(downloadLink);

0 commit comments

Comments
 (0)