Skip to content

Commit 987369c

Browse files
cubapCopilot
andauthored
Update components/manifest-import/index.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5b82b81 commit 987369c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

components/manifest-import/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ class ManifestImport extends HTMLElement {
3939
return
4040
}
4141

42+
// For multiple manifests, require explicit user confirmation before starting import
43+
if (this.#manifests.length > 1) {
44+
const confirmMessage = `You are about to import ${this.#manifests.length} manifests as new projects. Do you want to continue?`
45+
const proceed = window.confirm(confirmMessage)
46+
if (!proceed) {
47+
if (this.shadowRoot) {
48+
this.shadowRoot.innerHTML = '<p>Manifest import canceled by user.</p>'
49+
}
50+
return
51+
}
52+
}
4253
this.renderCreating()
4354
await this.#createProjects()
4455
}

0 commit comments

Comments
 (0)