fix: some bugs
This commit is contained in:
@@ -278,7 +278,7 @@ export default function UploadZone() {
|
||||
// ---- Step 1: Drive upload ----
|
||||
updateEntry(i, {
|
||||
status: 'uploading',
|
||||
progress: 0,
|
||||
progress: 1,
|
||||
error: undefined,
|
||||
driveStatus: 'uploading',
|
||||
driveError: undefined,
|
||||
@@ -300,7 +300,7 @@ export default function UploadZone() {
|
||||
return
|
||||
}
|
||||
|
||||
updateEntry(i, { driveStatus: 'success' })
|
||||
updateEntry(i, { driveStatus: 'success', progress: 50 })
|
||||
|
||||
// ---- Step 2: Git upload ----
|
||||
await pushGit(i, controller.signal)
|
||||
@@ -314,13 +314,11 @@ export default function UploadZone() {
|
||||
const pushGit = async (index: number, signal?: AbortSignal) => {
|
||||
const folderEntry = entries[index]
|
||||
|
||||
updateEntry(index, { progress: 5 })
|
||||
|
||||
const gitResult = await uploadGit(
|
||||
folderEntry,
|
||||
secret,
|
||||
destination!,
|
||||
(pct) => updateEntry(index, { progress: pct }),
|
||||
(pct) => updateEntry(index, { progress: 50 + Math.round(pct / 2) }),
|
||||
signal,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user