diff --git a/grassclipper.zip b/grassclipper.zip
deleted file mode 100644
index bebbaab..0000000
Binary files a/grassclipper.zip and /dev/null differ
diff --git a/src/ui/App.tsx b/src/ui/App.tsx
index b38b4e0..06a341a 100644
--- a/src/ui/App.tsx
+++ b/src/ui/App.tsx
@@ -18,12 +18,20 @@ async function download(url: string, filename: string, path: string) {
downloadHandler.addDownload(url, completePath)
}
+async function TESTDOWNLOAD() {
+ download(
+ 'https://github.com/Grasscutters/Grasscutter/archive/refs/heads/stable.zip',
+ 'grasscutter.zip',
+ 'S:/Cultivation'
+ )
+}
+
function App() {
return (
-
+
diff --git a/src/ui/components/common/MainProgressBar.tsx b/src/ui/components/common/MainProgressBar.tsx
index 8e78c03..98ad192 100644
--- a/src/ui/components/common/MainProgressBar.tsx
+++ b/src/ui/components/common/MainProgressBar.tsx
@@ -37,9 +37,7 @@ export default class ProgressBar extends React.Component {
total: prog?.total || 0,
})
- if (this.state.files === 0 /* || this.state.status === 'error' */) {
- clearInterval(intv)
- }
+ console.log(prog)
}, 500)
}
diff --git a/src/utils/download.ts b/src/utils/download.ts
index 6f2f589..4c96cb3 100644
--- a/src/utils/download.ts
+++ b/src/utils/download.ts
@@ -61,7 +61,7 @@ export default class DownloadHandler {
const progress = files.reduce((acc, d) => acc + d.progress, 0)
return {
- average: (progress / total) * 100,
+ average: (progress / total) * 100 || 0,
files: this.downloads.filter(d => d.status !== 'finished').length,
totalSize: total,
}