mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35: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;
|
export let content: string;
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
if (!navigator.userActivation.hasBeenActive) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($settings?.notificationSound ?? true) {
|
if ($settings?.notificationSound ?? true) {
|
||||||
const audio = new Audio(`/audio/notification.mp3`);
|
const audio = new Audio(`/audio/notification.mp3`);
|
||||||
audio.play();
|
audio.play();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue