(notify) set the notification silent but play a sound in…

This commit is contained in:
2021-02-28 17:27:28 +01:00
parent 761af20ad9
commit dcb5de7134
2 changed files with 4 additions and 0 deletions

BIN
public/sound/toggle.mp3 Normal file

Binary file not shown.

View File

@@ -14,6 +14,8 @@ import { useGetters } from 'vuex-composition-helpers'
import { GetterTree } from 'vuex' import { GetterTree } from 'vuex'
import { State } from '@/store' import { State } from '@/store'
const toggleSound = new Audio('/sound/toggle.mp3')
const format = (num: number) => { const format = (num: number) => {
return num.toString().padStart(2, '0') return num.toString().padStart(2, '0')
} }
@@ -59,6 +61,8 @@ export const useTimer = () => {
const dev = isDev1Turn.value ? dev1.value : dev2.value const dev = isDev1Turn.value ? dev1.value : dev2.value
toggleSound.play()
notify(i18n.t('notification.change.title').toString(), { notify(i18n.t('notification.change.title').toString(), {
body: i18n.t('notification.change.body', { dev }).toString() body: i18n.t('notification.change.body', { dev }).toString()
}) })