mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 19:44:57 +02:00
Add browser notifications sound (#8515)
Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
import chunter, { ThreadMessage } from '@hcengineering/chunter'
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
import activity, { ActivityMessage } from '@hcengineering/activity'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
|
||||
import { getClient, playSound } from '@hcengineering/presentation'
|
||||
import { pushAvailable, subscribePush } from '../utils'
|
||||
import plugin from '../plugin'
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
export let notification: PlatformNotification
|
||||
export let onRemove: () => void
|
||||
@@ -54,6 +54,11 @@
|
||||
const fn = await getResource(chunter.function.OpenChannelInSidebar)
|
||||
await fn(_id, _class, undefined, thread, true, selectedMessageId)
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
if (!value.soundAlert) return
|
||||
await playSound(plugin.sound.InboxNotification)
|
||||
})
|
||||
</script>
|
||||
|
||||
<NotificationToast title={notification.title} severity={notification.severity} onClose={onRemove}>
|
||||
|
||||
Reference in New Issue
Block a user