mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: update upload dialog status when async download completes
Watch assetDownloadStore.lastCompletedDownload so the wizard transitions from 'processing' to 'success' once the tracked async task finishes.
This commit is contained in:
@@ -247,6 +247,17 @@ export function useUploadModelWizard(modelTypes: Ref<ModelTypeOption[]>) {
|
||||
)
|
||||
}
|
||||
uploadStatus.value = 'processing'
|
||||
|
||||
const stopWatch = watch(
|
||||
() => assetDownloadStore.lastCompletedDownload,
|
||||
async (completed) => {
|
||||
if (completed?.taskId === result.task.task_id) {
|
||||
uploadStatus.value = 'success'
|
||||
await refreshModelCaches()
|
||||
stopWatch()
|
||||
}
|
||||
}
|
||||
)
|
||||
} else {
|
||||
uploadStatus.value = 'success'
|
||||
await refreshModelCaches()
|
||||
|
||||
Reference in New Issue
Block a user