diff --git a/server/src/routes/ui.rs b/server/src/routes/ui.rs index 6857f7e..356c40f 100644 --- a/server/src/routes/ui.rs +++ b/server/src/routes/ui.rs @@ -278,8 +278,16 @@ pub async fn index(State(s): State) -> Result, StatusCode async function deploy(id) {{ if (!confirm('Deploy ' + id + ' now?')) return; const r = await fetch('/api/apps/' + id + '/deploy', {{method: 'POST'}}); - if (r.ok) window.location.href = '/apps/' + id; - else alert('Error: ' + await r.text()); + if (r.ok) {{ + // Immediately show building; the 5 s poller will advance to the final status. + const row = document.querySelector(`tr[data-id="${{id}}"]`); + if (row) {{ + const db = row.querySelector('[data-deploy-badge]'); + if (db) db.innerHTML = deployBadgeHtml('building'); + }} + }} else {{ + alert('Error: ' + await r.text()); + }} }} async function del(id) {{ if (!confirm('Delete app "' + id + '"? This cannot be undone.')) return;