-
downloading...
-
+
+
Downloading update...
+
+
+ {Math.round(downloadProgress)}% complete
+
), {
id: "download-progress",
duration: Infinity,
});
- },
- []
- )
+ }
+ }, [downloadProgress, isDownloading]);
const onUpdateDownloaded = useCallback(
(_event: Electron.IpcRendererEvent) => {
toast.dismiss("download-progress");
+ setIsDownloading(false);
toast.success("download completed", {
description: "click to install update",
action: {
From 50207d94f9a7f78c9b40b24da83b1b4f162c79a5 Mon Sep 17 00:00:00 2001
From: sw3205933776 <3205933776@qq.com>
Date: Fri, 1 Aug 2025 17:15:40 +0800
Subject: [PATCH 2/4] fix: update comment for clarity on download progress
handling
---
src/components/update/index.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/update/index.tsx b/src/components/update/index.tsx
index 95145226c..e89cff6fb 100644
--- a/src/components/update/index.tsx
+++ b/src/components/update/index.tsx
@@ -53,8 +53,8 @@ const Update = () => {
},
[]
)
-
- // 监听下载进度变化,更新 toast
+
+ // listen to download progress and update toast
useEffect(() => {
if (isDownloading) {
toast.custom((t) => (
From 8b994db4d2230c4464556ddccfda0646762031ac Mon Sep 17 00:00:00 2001
From: sw3205933776 <3205933776@qq.com>
Date: Fri, 1 Aug 2025 17:28:53 +0800
Subject: [PATCH 3/4] style: update progress bar color
---
src/components/ui/progress.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/ui/progress.tsx b/src/components/ui/progress.tsx
index cda3ab63f..7b17f4c2d 100644
--- a/src/components/ui/progress.tsx
+++ b/src/components/ui/progress.tsx
@@ -16,7 +16,8 @@ const Progress = React.forwardRef<
{...props}
>
From 3900c44d047c70efbcf1c16a32683efc4c74f9e2 Mon Sep 17 00:00:00 2001
From: sw3205933776 <3205933776@qq.com>
Date: Fri, 1 Aug 2025 17:29:10 +0800
Subject: [PATCH 4/4] chore: remove commented-out code
---
src/components/ui/progress.tsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/components/ui/progress.tsx b/src/components/ui/progress.tsx
index 7b17f4c2d..701c0d2ed 100644
--- a/src/components/ui/progress.tsx
+++ b/src/components/ui/progress.tsx
@@ -17,7 +17,6 @@ const Progress = React.forwardRef<
>