small change in js

This commit is contained in:
Mateusz Gruszczyński
2026-02-17 11:20:24 +01:00
parent 5d2c5aa451
commit 4485aa37ba
2 changed files with 228 additions and 19 deletions

View File

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