diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 02215a9f..b7178c81 100755 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -404,9 +404,10 @@ "completed": "Completed", "removed": "Not downloaded", "cancel": "Cancel", - "cancel_download": "Cancel download", - "cancel_download_description": "Are you sure you want to cancel this download? This will delete all downloaded files.", - "keep_downloading": "Keep downloading", + "cancel_download": "Cancel download?", + "cancel_download_description": "Are you sure you want to cancel this download? All downloaded files will be deleted.", + "keep_downloading": "No, keep downloading", + "yes_cancel": "Yes, cancel", "filter": "Filter downloaded games", "remove": "Remove", "downloading_metadata": "Downloading metadata…", diff --git a/src/main/services/download/js-http-downloader.ts b/src/main/services/download/js-http-downloader.ts index 44a3af49..c90c1a95 100644 --- a/src/main/services/download/js-http-downloader.ts +++ b/src/main/services/download/js-http-downloader.ts @@ -258,7 +258,11 @@ export class JsHttpDownloader { } private handleDownloadError(err: Error): void { - if (err.name === "AbortError") { + // Handle abort/cancellation errors - these are expected when user pauses/cancels + if ( + err.name === "AbortError" || + (err as NodeJS.ErrnoException).code === "ERR_STREAM_PREMATURE_CLOSE" + ) { logger.log("[JsHttpDownloader] Download aborted"); this.status = "paused"; } else { diff --git a/src/renderer/src/pages/downloads/download-group.tsx b/src/renderer/src/pages/downloads/download-group.tsx index 1bb8c76d..018bdc8d 100644 --- a/src/renderer/src/pages/downloads/download-group.tsx +++ b/src/renderer/src/pages/downloads/download-group.tsx @@ -844,7 +844,7 @@ export function DownloadGroup({ visible={cancelModalVisible} title={t("cancel_download")} descriptionText={t("cancel_download_description")} - confirmButtonLabel={t("cancel")} + confirmButtonLabel={t("yes_cancel")} cancelButtonLabel={t("keep_downloading")} onConfirm={handleConfirmCancel} onClose={handleCancelModalClose} @@ -877,7 +877,7 @@ export function DownloadGroup({ visible={cancelModalVisible} title={t("cancel_download")} descriptionText={t("cancel_download_description")} - confirmButtonLabel={t("cancel")} + confirmButtonLabel={t("yes_cancel")} cancelButtonLabel={t("keep_downloading")} onConfirm={handleConfirmCancel} onClose={handleCancelModalClose} diff --git a/src/renderer/src/pages/notifications/notifications.scss b/src/renderer/src/pages/notifications/notifications.scss index 20fbc343..f858f577 100644 --- a/src/renderer/src/pages/notifications/notifications.scss +++ b/src/renderer/src/pages/notifications/notifications.scss @@ -91,6 +91,7 @@ display: flex; flex-direction: column; gap: globals.$spacing-unit; + padding-bottom: calc(globals.$spacing-unit * 3); } &__empty { @@ -134,5 +135,6 @@ display: flex; justify-content: center; padding: calc(globals.$spacing-unit * 2); + padding-bottom: calc(globals.$spacing-unit * 3); } }