fix: error state resettable via mic click, debug logging, pipeline traceback

This commit is contained in:
2026-04-01 12:41:45 +02:00
parent 6574481647
commit 6e317a9c67
4 changed files with 20 additions and 3 deletions
+10 -2
View File
@@ -47,12 +47,20 @@ function setStatus(status) {
btn.className = status;
headerStatus.className = `status-badge ${status}`;
const label = STATUS_LABELS[status] || status;
statusText.textContent = label;
statusText.textContent = status === 'error' ? label + ' — klicken zum Zurücksetzen' : label;
headerStatus.textContent = label;
btn.disabled = status === 'processing';
}
btn.addEventListener('click', () => apiFetch('/toggle', { method: 'POST' }));
btn.addEventListener('click', async () => {
const r = await apiFetch('/toggle', { method: 'POST' });
const data = await r.json();
if (data.action === 'reset') {
preview.textContent = 'Noch keine Aufnahme verarbeitet.';
preview.classList.remove('has-content');
setStatus('idle');
}
});
function connectWs() {
const proto = location.protocol === 'https:' ? 'wss:' : 'ws:';