mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
refac: notification sound behaviour
This commit is contained in:
parent
6b3be4bb5b
commit
996ade9090
1 changed files with 4 additions and 0 deletions
|
|
@ -12,6 +12,10 @@
|
|||
export let content: string;
|
||||
|
||||
onMount(() => {
|
||||
if (!navigator.userActivation.hasBeenActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($settings?.notificationSound ?? true) {
|
||||
const audio = new Audio(`/audio/notification.mp3`);
|
||||
audio.play();
|
||||
|
|
|
|||
Loading…
Reference in a new issue