small change in js
This commit is contained in:
@@ -29,6 +29,13 @@ function stopProgressPolling() {
|
||||
}
|
||||
|
||||
function updateProgressUI(message, progress, total) {
|
||||
|
||||
if (window.progressInitTimeout) {
|
||||
clearTimeout(window.progressInitTimeout);
|
||||
window.progressInitTimeout = null;
|
||||
}
|
||||
|
||||
|
||||
const progressSection = document.getElementById('progressSection');
|
||||
const progressBar = progressSection.querySelector('.progress-bar');
|
||||
const progressMessage = document.getElementById('progressMessage');
|
||||
@@ -66,6 +73,19 @@ function showProgress() {
|
||||
progressSection.style.display = 'block';
|
||||
document.getElementById('generateBtn').disabled = true;
|
||||
|
||||
window.progressInitTimeout = setTimeout(() => {
|
||||
if (progressMessage && progressMessage.textContent === 'Initializing...') {
|
||||
progressMessage.innerHTML = `
|
||||
<div>Initializing...</div>
|
||||
<div style="margin-top: 10px; color: #856404; background: #fff3cd; padding: 10px; border-radius: 4px; font-size: 0.9em;">
|
||||
Taking longer than expected...<br>
|
||||
All workers may be busy processing other requests.<br>
|
||||
Please wait for the queue to clear.
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}, 5000);
|
||||
|
||||
startProgressPolling();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user