mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
add selected download notification
This commit is contained in:
@@ -262,7 +262,16 @@ const FileListing: FunctionComponent<{ query?: ParsedUrlQuery }> = ({ query }) =
|
||||
el.remove()
|
||||
} else if (files.length > 1) {
|
||||
setTotalGenerating(true)
|
||||
saveFiles(files, folder).then(() => setTotalGenerating(false))
|
||||
const toastId = toast.loading('Downloading selected files. This may be slow...')
|
||||
saveFiles(files, folder).then(() => {
|
||||
setTotalGenerating(false)
|
||||
toast.dismiss(toastId)
|
||||
toast.success('Finished to download selected files.')
|
||||
}).catch(() => {
|
||||
setTotalGenerating(false)
|
||||
toast.dismiss(toastId)
|
||||
toast.error('Failed to download selected files.')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user