fix: show error toast on download error

This commit is contained in:
Chaiyapruek Muangsiri 2025-08-04 20:40:17 +08:00
parent b1984a452e
commit 38c5911460
2 changed files with 12 additions and 2 deletions

View File

@ -161,8 +161,14 @@ export function DownloadManagement() {
console.debug('onFileDownloadError', state) console.debug('onFileDownloadError', state)
removeDownload(state.modelId) removeDownload(state.modelId)
removeLocalDownloadingModel(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( const onFileDownloadStopped = useCallback(

View File

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