feat: simplify playPopSound setting check
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user