diff --git a/ttstoy/webui/templates/dashboard.html b/ttstoy/webui/templates/dashboard.html index 0e3f412..4796c85 100644 --- a/ttstoy/webui/templates/dashboard.html +++ b/ttstoy/webui/templates/dashboard.html @@ -117,13 +117,14 @@ Generate Only - + Post to Discord - - - + + + + Download @@ -304,7 +305,8 @@ async function submitTTS() { spinner.style.display = 'none'; status.textContent = 'Playing in VC — posted to Discord channel.'; document.getElementById('tts-audio').src = `/api/tts/${job_id}/audio`; - result.style.display = 'block'; + document.getElementById('tts-download').href = `/api/tts/${job_id}/audio`; + result.style.display = 'flex'; } else if (job.status === 'error') { clearInterval(poll); spinner.style.display = 'none'; @@ -336,7 +338,8 @@ async function generateOnly() { spinner.style.display = 'none'; status.textContent = post_to_discord ? 'Audio ready — posted to Discord channel.' : 'Audio ready.'; document.getElementById('tts-audio').src = `/api/tts/${job_id}/audio`; - result.style.display = 'block'; + document.getElementById('tts-download').href = `/api/tts/${job_id}/audio`; + result.style.display = 'flex'; } else if (job.status === 'error') { clearInterval(poll); spinner.style.display = 'none';