1
0

Merge branch 'main' into feature/login-improvements

This commit is contained in:
kolaente
2021-12-26 12:19:44 +01:00
23 changed files with 435 additions and 295 deletions

View File

@ -1,11 +0,0 @@
export const playSoundWhenDoneKey = 'playSoundWhenTaskDone'
export const playPop = () => {
const enabled = localStorage.getItem(playSoundWhenDoneKey) === 'true' || localStorage.getItem(playSoundWhenDoneKey) === null
if(!enabled) {
return
}
const popSound = new Audio('/audio/pop.mp3')
popSound.play()
}

13
src/helpers/playPop.ts Normal file
View File

@ -0,0 +1,13 @@
import popSoundFile from '@/assets/audio/pop.mp3'
export const playSoundWhenDoneKey = 'playSoundWhenTaskDone'
export function playPop() {
const enabled = Boolean(localStorage.getItem(playSoundWhenDoneKey))
if(!enabled) {
return
}
const popSound = new Audio(popSoundFile)
popSound.play()
}