Browse Source
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: #1229 Reviewed-by: konrad <k@knt.li> Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de> Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>pull/1234/head
3 changed files with 13 additions and 11 deletions
@ -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() |
||||
} |
@ -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() |
||||
} |
Loading…
Reference in new issue