Merge pull request #6044 from cmppoon/error-toast-on-download-failed

fix: show error toast message on download error
This commit is contained in:
Louis 2025-08-04 22:45:17 +07:00 committed by GitHub
commit 29ad6691d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -161,8 +161,14 @@ export function DownloadManagement() {
console.debug('onFileDownloadError', state)
removeDownload(state.modelId)
removeLocalDownloadingModel(state.modelId)
toast.error(t('common:toast.downloadFailed.title'), {
id: 'download-failed',
description: t('common:toast.downloadFailed.description', {
item: state.modelId,
}),
})
},
[removeDownload, removeLocalDownloadingModel]
[removeDownload, removeLocalDownloadingModel, t]
)
const onFileDownloadStopped = useCallback(

View File

@ -257,6 +257,10 @@
"downloadCancelled": {
"title": "Download Cancelled",
"description": "The download process was cancelled"
},
"downloadFailed": {
"title": "Download Failed",
"description": "{{item}} download failed"
}
}
}
}