in-article image progress bar
This commit is contained in:
@@ -418,14 +418,19 @@ export default function ImageQueueModal({
|
|||||||
delete progressIntervalsRef.current[item.index];
|
delete progressIntervalsRef.current[item.index];
|
||||||
}
|
}
|
||||||
return { ...item, status: 'completed', progress: 100 };
|
return { ...item, status: 'completed', progress: 100 };
|
||||||
} else if (index + 1 === current_image || current_image_id === item.imageId) {
|
}
|
||||||
// Currently processing - use backend progress if available (works for featured and in-article)
|
// SAFE: Only change to 'processing' when backend confirms with actual image ID
|
||||||
const backendProgress = (current_image_progress !== undefined && current_image_id === item.imageId)
|
// This ensures progress bar only moves when actual processing starts
|
||||||
|
// Works consistently for both featured and in-article images
|
||||||
|
else if (current_image_id === item.imageId) {
|
||||||
|
// Currently processing - use backend progress if available
|
||||||
|
const backendProgress = (current_image_progress !== undefined)
|
||||||
? current_image_progress
|
? current_image_progress
|
||||||
: (smoothProgress[item.index] ?? 0);
|
: (smoothProgress[item.index] ?? 0);
|
||||||
return { ...item, status: 'processing', progress: backendProgress };
|
return { ...item, status: 'processing', progress: backendProgress };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Keep as 'pending' until backend confirms processing with image ID
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default function Usage() {
|
|||||||
<div className="p-6">
|
<div className="p-6">
|
||||||
<PageMeta title="Usage" description="Monitor your plan limits and usage statistics" />
|
<PageMeta title="Usage" description="Monitor your plan limits and usage statistics" />
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Acoount Limits Usage 4</h1>
|
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Acoount Limits Usage 5</h1>
|
||||||
<p className="text-gray-600 dark:text-gray-400 mt-1">Monitor your plan limits and usage statistics</p>
|
<p className="text-gray-600 dark:text-gray-400 mt-1">Monitor your plan limits and usage statistics</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user