Merge branch 'main' into feature/date-math
This commit is contained in:
commit
a8ee54d626
11 changed files with 50 additions and 34 deletions
|
|
@ -3,11 +3,15 @@ import popSoundFile from '@/assets/audio/pop.mp3'
|
|||
export const playSoundWhenDoneKey = 'playSoundWhenTaskDone'
|
||||
|
||||
export function playPop() {
|
||||
const enabled = Boolean(localStorage.getItem(playSoundWhenDoneKey))
|
||||
if(!enabled) {
|
||||
const enabled = localStorage.getItem(playSoundWhenDoneKey) === 'true'
|
||||
if (!enabled) {
|
||||
return
|
||||
}
|
||||
|
||||
playPopSound()
|
||||
}
|
||||
|
||||
export function playPopSound() {
|
||||
const popSound = new Audio(popSoundFile)
|
||||
popSound.play()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue