diff --git a/src/static/js/components.js b/src/static/js/components.js index 89762d0..b32dce0 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -354,9 +354,22 @@ const UI = { const minBtn = document.getElementById('progress-popup-minimize'); if (minBtn) minBtn.style.display = state.isFirst ? 'none' : ''; - // Title + // Title - haengt von Status ab (queued = wartet, cancelling = bricht ab, sonst laeuft) const titleEl = document.getElementById('progress-popup-title'); - if (titleEl) titleEl.textContent = state.isFirst ? 'Erste Recherche l\u00e4uft' : 'Aktualisierung l\u00e4uft'; + if (titleEl) { + let title; + if (status === 'queued') { + const pos = (state && state._queuePos) ? ' (#' + state._queuePos + ')' : ''; + title = 'In Warteschlange' + pos; + } else if (status === 'cancelling') { + title = 'Wird abgebrochen\u2026'; + } else if (state.isFirst) { + title = 'Erste Recherche l\u00e4uft'; + } else { + title = 'Aktualisierung l\u00e4uft'; + } + titleEl.textContent = title; + } // Multi-pass info const passEl = document.getElementById('progress-popup-pass');