mirror of
https://github.com/open-webui/open-webui
synced 2025-03-04 03:18:03 +00:00
enh: option to toggle notification sound
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
This commit is contained in:
parent
645313e321
commit
798886105e
@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { settings } from '$lib/stores';
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
|
|
||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
@ -11,8 +12,10 @@
|
|||||||
export let content: string;
|
export let content: string;
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
if ($settings?.notificationSound ?? true) {
|
||||||
const audio = new Audio(`/audio/notification.mp3`);
|
const audio = new Audio(`/audio/notification.mp3`);
|
||||||
audio.play();
|
audio.play();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
let showUsername = false;
|
let showUsername = false;
|
||||||
let richTextInput = true;
|
let richTextInput = true;
|
||||||
let largeTextAsFile = false;
|
let largeTextAsFile = false;
|
||||||
|
let notificationSound = true;
|
||||||
|
|
||||||
let landingPageMode = '';
|
let landingPageMode = '';
|
||||||
let chatBubble = true;
|
let chatBubble = true;
|
||||||
@ -81,6 +82,11 @@
|
|||||||
saveSettings({ showUpdateToast: showUpdateToast });
|
saveSettings({ showUpdateToast: showUpdateToast });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const toggleNotificationSound = async () => {
|
||||||
|
notificationSound = !notificationSound;
|
||||||
|
saveSettings({ notificationSound: notificationSound });
|
||||||
|
};
|
||||||
|
|
||||||
const toggleShowChangelog = async () => {
|
const toggleShowChangelog = async () => {
|
||||||
showChangelog = !showChangelog;
|
showChangelog = !showChangelog;
|
||||||
saveSettings({ showChangelog: showChangelog });
|
saveSettings({ showChangelog: showChangelog });
|
||||||
@ -216,6 +222,8 @@
|
|||||||
chatDirection = $settings.chatDirection ?? 'LTR';
|
chatDirection = $settings.chatDirection ?? 'LTR';
|
||||||
userLocation = $settings.userLocation ?? false;
|
userLocation = $settings.userLocation ?? false;
|
||||||
|
|
||||||
|
notificationSound = $settings.notificationSound ?? true;
|
||||||
|
|
||||||
hapticFeedback = $settings.hapticFeedback ?? false;
|
hapticFeedback = $settings.hapticFeedback ?? false;
|
||||||
|
|
||||||
imageCompression = $settings.imageCompression ?? false;
|
imageCompression = $settings.imageCompression ?? false;
|
||||||
@ -371,6 +379,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class=" py-0.5 flex w-full justify-between">
|
||||||
|
<div class=" self-center text-xs">
|
||||||
|
{$i18n.t('Notification Sound')}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="p-1 px-3 text-xs flex rounded transition"
|
||||||
|
on:click={() => {
|
||||||
|
toggleNotificationSound();
|
||||||
|
}}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
{#if notificationSound === true}
|
||||||
|
<span class="ml-2 self-center">{$i18n.t('On')}</span>
|
||||||
|
{:else}
|
||||||
|
<span class="ml-2 self-center">{$i18n.t('Off')}</span>
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{#if $user.role === 'admin'}
|
{#if $user.role === 'admin'}
|
||||||
<div>
|
<div>
|
||||||
<div class=" py-0.5 flex w-full justify-between">
|
<div class=" py-0.5 flex w-full justify-between">
|
||||||
|
Loading…
Reference in New Issue
Block a user