mirror of
https://github.com/open-webui/open-webui
synced 2024-12-28 06:42:47 +00:00
enh: notification sound
This commit is contained in:
parent
2d44cd4cda
commit
b70a31f81e
@ -2,13 +2,18 @@
|
|||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
|
|
||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
import { createEventDispatcher } from 'svelte';
|
import { createEventDispatcher, onMount } from 'svelte';
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
export let onClick: Function = () => {};
|
export let onClick: Function = () => {};
|
||||||
export let title: string = 'HI';
|
export let title: string = 'HI';
|
||||||
export let content: string;
|
export let content: string;
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
const audio = new Audio(`/audio/notification.mp3`);
|
||||||
|
audio.play();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
BIN
static/audio/notification.mp3
Normal file
BIN
static/audio/notification.mp3
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user