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:
dante01yoon
2026-04-03 18:43:47 +09:00
parent 00b876bab5
commit 2f194851b8

View File

@@ -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()