|
@@ -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">
|