1
0

feat: simplify playPopSound setting check

This commit is contained in:
Dominik Pschenitschni
2024-07-05 14:24:53 +02:00
parent 5cf57a520c
commit 42c458a736
5 changed files with 11 additions and 9 deletions

View File

@ -1,8 +1,13 @@
import {useAuthStore} from '@/stores/auth'
import popSoundFile from '@/assets/audio/pop.mp3'
export const playSoundWhenDoneKey = 'playSoundWhenTaskDone'
export function playPopSound() {
const playSoundWhenDone = useAuthStore().settings.frontendSettings.playSoundWhenDone
if (!playSoundWhenDone)
return
try {
const popSound = new Audio(popSoundFile)
popSound.play()