feat: enhance model version download with progress tracking

- Set refresh to true when fetching model update versions to ensure latest data
- Refactor handleDownloadVersion to be async and accept button parameter
- Add progress tracking and WebSocket integration for download operations
- Implement button state management during download process
- Add error handling and cleanup for download operations
- Update download action to await async download handler
This commit is contained in:
Will Miao
2025-10-26 09:39:42 +08:00
parent 51098f2829
commit 994fa4bd43
3 changed files with 176 additions and 86 deletions

View File

@@ -38,6 +38,7 @@ export class LoadingManager {
this.setProgress(0);
this.setStatus('');
this.removeDetailsContainer();
this.progressBar.style.display = 'block';
}
// Create a details container for enhanced progress display
@@ -69,6 +70,7 @@ export class LoadingManager {
// Show enhanced progress for downloads
showDownloadProgress(totalItems = 1) {
this.show(translate('modals.download.status.preparing', {}, 'Preparing download...'), 0);
this.progressBar.style.display = 'none';
// Create details container
const detailsContainer = this.createDetailsContainer();