mirror of
https://github.com/open-webui/open-webui
synced 2025-05-15 19:16:35 +00:00
enh: option to disable update toast
This commit is contained in:
parent
47e377967e
commit
6cb41a38a6
@ -34,6 +34,7 @@
|
|||||||
let landingPageMode = '';
|
let landingPageMode = '';
|
||||||
let chatBubble = true;
|
let chatBubble = true;
|
||||||
let chatDirection: 'LTR' | 'RTL' = 'LTR';
|
let chatDirection: 'LTR' | 'RTL' = 'LTR';
|
||||||
|
let showUpdateToast = true;
|
||||||
|
|
||||||
let showEmojiInCall = false;
|
let showEmojiInCall = false;
|
||||||
let voiceInterruption = false;
|
let voiceInterruption = false;
|
||||||
@ -49,7 +50,7 @@
|
|||||||
saveSettings({ scrollOnBranchChange: scrollOnBranchChange });
|
saveSettings({ scrollOnBranchChange: scrollOnBranchChange });
|
||||||
};
|
};
|
||||||
|
|
||||||
const togglewidescreenMode = async () => {
|
const toggleWidescreenMode = async () => {
|
||||||
widescreenMode = !widescreenMode;
|
widescreenMode = !widescreenMode;
|
||||||
saveSettings({ widescreenMode: widescreenMode });
|
saveSettings({ widescreenMode: widescreenMode });
|
||||||
};
|
};
|
||||||
@ -64,6 +65,11 @@
|
|||||||
saveSettings({ landingPageMode: landingPageMode });
|
saveSettings({ landingPageMode: landingPageMode });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const toggleShowUpdateToast = async () => {
|
||||||
|
showUpdateToast = !showUpdateToast;
|
||||||
|
saveSettings({ showUpdateToast: showUpdateToast });
|
||||||
|
};
|
||||||
|
|
||||||
const toggleShowUsername = async () => {
|
const toggleShowUsername = async () => {
|
||||||
showUsername = !showUsername;
|
showUsername = !showUsername;
|
||||||
saveSettings({ showUsername: showUsername });
|
saveSettings({ showUsername: showUsername });
|
||||||
@ -159,7 +165,9 @@
|
|||||||
autoTags = $settings.autoTags ?? true;
|
autoTags = $settings.autoTags ?? true;
|
||||||
|
|
||||||
responseAutoCopy = $settings.responseAutoCopy ?? false;
|
responseAutoCopy = $settings.responseAutoCopy ?? false;
|
||||||
|
|
||||||
showUsername = $settings.showUsername ?? false;
|
showUsername = $settings.showUsername ?? false;
|
||||||
|
showUpdateToast = $settings.showUpdateToast ?? true;
|
||||||
|
|
||||||
showEmojiInCall = $settings.showEmojiInCall ?? false;
|
showEmojiInCall = $settings.showEmojiInCall ?? false;
|
||||||
voiceInterruption = $settings.voiceInterruption ?? false;
|
voiceInterruption = $settings.voiceInterruption ?? false;
|
||||||
@ -315,7 +323,7 @@
|
|||||||
<button
|
<button
|
||||||
class="p-1 px-3 text-xs flex rounded transition"
|
class="p-1 px-3 text-xs flex rounded transition"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
togglewidescreenMode();
|
toggleWidescreenMode();
|
||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
@ -346,6 +354,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{#if $user.role === 'admin'}
|
||||||
|
<div>
|
||||||
|
<div class=" py-0.5 flex w-full justify-between">
|
||||||
|
<div class=" self-center text-xs">
|
||||||
|
{$i18n.t('Toast notifications for new updates')}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="p-1 px-3 text-xs flex rounded transition"
|
||||||
|
on:click={() => {
|
||||||
|
toggleShowUpdateToast();
|
||||||
|
}}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
{#if showUpdateToast === 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}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class=" py-0.5 flex w-full justify-between">
|
<div class=" py-0.5 flex w-full justify-between">
|
||||||
<div class=" self-center text-xs">
|
<div class=" self-center text-xs">
|
||||||
|
@ -231,7 +231,7 @@
|
|||||||
<SettingsModal bind:show={$showSettings} />
|
<SettingsModal bind:show={$showSettings} />
|
||||||
<ChangelogModal bind:show={$showChangelog} />
|
<ChangelogModal bind:show={$showChangelog} />
|
||||||
|
|
||||||
{#if version && compareVersion(version.latest, version.current)}
|
{#if version && compareVersion(version.latest, version.current) && ($settings?.showUpdateToast ?? true)}
|
||||||
<div class=" absolute bottom-8 right-8 z-50" in:fade={{ duration: 100 }}>
|
<div class=" absolute bottom-8 right-8 z-50" in:fade={{ duration: 100 }}>
|
||||||
<UpdateInfoToast
|
<UpdateInfoToast
|
||||||
{version}
|
{version}
|
||||||
|
Loading…
Reference in New Issue
Block a user