diff --git a/scripts/createDeploy.js b/scripts/createDeploy.js index 604236f94..2483dabb5 100644 --- a/scripts/createDeploy.js +++ b/scripts/createDeploy.js @@ -77,6 +77,7 @@ const createDeployFiles = async () => { if (err) { reject(); } + destination.close(); resolve(); }); }); diff --git a/src/app/desktop/utils/downloader.js b/src/app/desktop/utils/downloader.js index 043d65a5f..210eaf761 100644 --- a/src/app/desktop/utils/downloader.js +++ b/src/app/desktop/utils/downloader.js @@ -103,8 +103,10 @@ const downloadFileInstance = async (fileName, url, sha1, legacyPath) => { data.on('end', () => { wStream.end(); + wStream.close(); if (legacyPath) { wStreamLegacy.end(); + wStreamLegacy.close(); } resolve(); }); @@ -148,6 +150,7 @@ export const downloadFile = async (fileName, url, onProgress) => { return new Promise((resolve, reject) => { data.on('end', () => { out.end(); + out.close(); resolve(); }); diff --git a/src/common/modals/InstanceDeleteConfirmation.js b/src/common/modals/InstanceDeleteConfirmation.js index 3351c0573..c990f0bcb 100644 --- a/src/common/modals/InstanceDeleteConfirmation.js +++ b/src/common/modals/InstanceDeleteConfirmation.js @@ -67,7 +67,12 @@ const InstanceDeleteConfirmation = ({ instanceName }) => { > No, Abort - diff --git a/src/common/modals/InstanceDownloadFailed.js b/src/common/modals/InstanceDownloadFailed.js index c6d1a1b98..04c920dde 100644 --- a/src/common/modals/InstanceDownloadFailed.js +++ b/src/common/modals/InstanceDownloadFailed.js @@ -8,7 +8,7 @@ import { removeDownloadFromQueue, updateInstanceConfig } from '../reducers/actions'; -import { closeModal } from '../reducers/modals/actions'; +import { openModal, closeModal } from '../reducers/modals/actions'; import { _getInstancesPath, _getTempPath } from '../utils/selectors'; import { rollBackInstanceZip } from '../utils'; @@ -28,7 +28,15 @@ const InstanceDownloadFailed = ({ ? `${instanceName.substring(0, 20)}...` : instanceName; - const cancelDownload = async () => { + const deleteDownload = async () => { + await dispatch(removeDownloadFromQueue(instanceName, true)); + + dispatch(closeModal()); + await new Promise(resolve => setTimeout(resolve, 1000)); + dispatch(openModal('InstanceDeleteConfirmation', { instanceName })); + }; + + const restoreDownload = async () => { await dispatch(removeDownloadFromQueue(instanceName, true)); setLoading(true); await new Promise(resolve => setTimeout(resolve, 1000)); @@ -87,11 +95,21 @@ const InstanceDownloadFailed = ({ + {isUpdate && ( + + )} diff --git a/src/common/modals/OptedOutModsList.js b/src/common/modals/OptedOutModsList.js index a47d53a72..80c5a1abb 100644 --- a/src/common/modals/OptedOutModsList.js +++ b/src/common/modals/OptedOutModsList.js @@ -202,17 +202,19 @@ const OptedOutModsList = ({ title="Opted out mods list" > -
- Hey oh! It looks like some developers opted out from showing their - mods on third-party launchers. We can still attempt to download them - automatically. Please click continue and wait for all downloads to - finish. Please don't click anything inside the browser. -
+ {!cloudflareBlock && ( +
+ Hey oh! It looks like some developers opted out from showing their + mods on third-party launchers. We can still attempt to download them + automatically. Please click continue and wait for all downloads to + finish. Please don't click anything inside the browser. +
+ )} {optedOutMods && optedOutMods.map(mod => { @@ -231,7 +233,6 @@ const OptedOutModsList = ({ {cloudflareBlock && (

@@ -254,7 +255,9 @@ const OptedOutModsList = ({