fix: error state resettable via mic click, debug logging, pipeline traceback
This commit is contained in:
+10
-2
@@ -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:';
|
||||
|
||||
Reference in New Issue
Block a user