✨ (notify) set the notification silent but play a sound in…
This commit is contained in:
BIN
public/sound/toggle.mp3
Normal file
BIN
public/sound/toggle.mp3
Normal file
Binary file not shown.
@@ -14,6 +14,8 @@ import { useGetters } from 'vuex-composition-helpers'
|
||||
import { GetterTree } from 'vuex'
|
||||
import { State } from '@/store'
|
||||
|
||||
const toggleSound = new Audio('/sound/toggle.mp3')
|
||||
|
||||
const format = (num: number) => {
|
||||
return num.toString().padStart(2, '0')
|
||||
}
|
||||
@@ -59,6 +61,8 @@ export const useTimer = () => {
|
||||
|
||||
const dev = isDev1Turn.value ? dev1.value : dev2.value
|
||||
|
||||
toggleSound.play()
|
||||
|
||||
notify(i18n.t('notification.change.title').toString(), {
|
||||
body: i18n.t('notification.change.body', { dev }).toString()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user