Update web/templates/entry_view.html

This commit is contained in:
Joshua Laymon 2025-08-21 02:15:04 +00:00
parent 2d671dd2ce
commit 04e40ba82a

View File

@ -342,10 +342,10 @@
const usingOpenAI = Boolean(TTS_URL);
if (usingOpenAI) {
await playOpenAITTS();
showToast("Using OpenAI TTS");
// showToast("Using OpenAI TTS");
} else {
speakBrowserTTS();
showToast("Using Browser TTS");
// showToast("Using Browser TTS");
}
} catch (err) {
alert('TTS error: ' + (err && err.message ? err.message : String(err)));
@ -355,4 +355,41 @@
});
})();
</script>
<style>
.toast {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: #333;
color: #fff;
padding: 10px 20px;
border-radius: 6px;
opacity: 0;
transition: opacity 0.5s ease;
z-index: 9999;
}
.toast.show {
opacity: 1;
}
</style>
<script>
function showToast(message, duration = 3000) {
const toast = document.createElement("div");
toast.className = "toast";
toast.textContent = message;
document.body.appendChild(toast);
// Trigger fade in
setTimeout(() => toast.classList.add("show"), 50);
// Fade out & remove
setTimeout(() => {
toast.classList.remove("show");
setTimeout(() => document.body.removeChild(toast), 500);
}, duration);
}
</script>
{% endblock %}