у меня есть
window.addEventListener("DOMContentLoaded", () => {
document
.getElementById("selectZipButton")
.addEventListener("click", async () => {
const downloadUrl =
"https://drive.google.com/uc?id=1cKWy9JV70lpFYH4i53ADZzUIO3dYPPrF";
try {
const extractPath = await window.electronApi.selectFolder();
if (!extractPath) return;
const result = await window.electronApi.downloadAndExtract(downloadUrl);
if (result.success) {
console.log("Game downloaded and extracted successfully!");
alert("Game downloaded and extracted successfully!");
} else {
console.error("Error downloading and extracting game:", result.error);
alert("Error downloading and extracting game.");
}
} catch (error) {
console.error("Error:", error.message);
alert("Error: " + error.message);
}
});
но почему то он не работает и я не пойму почему, можете подсказать. при нажатии на кнопку появляется просто пустое окно с выбором файлов и ничего не скачивается и тем более не разархивируется