dodanie dziwięku po wykonaniu zadania

- ciekawe czy zadziala
pull/878/head
JanDziaslo 2025-11-17 07:47:02 +07:00 committed by GitHub
parent 7ea0e2f51f
commit 1f82b0853d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 0 deletions

@ -35,6 +35,15 @@ function initVikunjaWidget(widget) {
return response.json();
})
.then(data => {
// Play completion sound
const completionSound = document.getElementById('vikunja-completion-sound');
if (completionSound) {
completionSound.currentTime = 0;
completionSound.play().catch(err => {
console.log('Could not play completion sound:', err);
});
}
// Remove the row with animation
row.style.transition = 'opacity 0.3s ease';
row.style.opacity = '0';

@ -80,4 +80,10 @@
</div>
</div>
</div>
<!-- Audio element for task completion sound -->
<audio id="vikunja-completion-sound" preload="auto">
<source src="/static/sound/pop.mp3" type="audio/mpeg">
</audio>
{{ end }}