diff --git a/src/lib/components/layout/UpdateInfoToast.svelte b/src/lib/components/layout/UpdateInfoToast.svelte
index 266ed56dd..bb75de94f 100644
--- a/src/lib/components/layout/UpdateInfoToast.svelte
+++ b/src/lib/components/layout/UpdateInfoToast.svelte
@@ -14,7 +14,7 @@
{$i18n.t(`A new version (v{{LATEST_VERSION}}) is now available.`, {
diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte
index 794e6c383..ad2f085cf 100644
--- a/src/routes/(app)/+layout.svelte
+++ b/src/routes/(app)/+layout.svelte
@@ -46,6 +46,7 @@
import { compareVersion } from '$lib/utils';
import UpdateInfoToast from '$lib/components/layout/UpdateInfoToast.svelte';
+ import { fade } from 'svelte/transition';
const i18n = getContext('i18n');
@@ -53,6 +54,8 @@
let DB = null;
let localDBChats = [];
+ let version;
+
const getModels = async () => {
return _getModels(localStorage.token);
};
@@ -216,28 +219,24 @@
});
const checkForVersionUpdates = async () => {
- const version = await getVersionUpdates(localStorage.token).catch((error) => {
+ version = await getVersionUpdates(localStorage.token).catch((error) => {
return {
current: WEBUI_VERSION,
latest: WEBUI_VERSION
};
});
-
- if (compareVersion(version.latest, version.current)) {
- toast.custom(UpdateInfoToast, {
- duration: Number.POSITIVE_INFINITY,
- position: 'bottom-right',
- componentProps: {
- version
- }
- });
- }
};
+{#if version && compareVersion(version.latest, version.current)}
+
+
+
+{/if}
+