2024-02-05 09:58:54 +00:00
|
|
|
<script lang="ts">
|
2024-02-25 19:55:15 +00:00
|
|
|
import { getVersionUpdates } from '$lib/apis';
|
2024-02-05 09:58:54 +00:00
|
|
|
import { getOllamaVersion } from '$lib/apis/ollama';
|
2024-05-26 07:49:30 +00:00
|
|
|
import { WEBUI_BUILD_HASH, WEBUI_VERSION } from '$lib/constants';
|
2024-02-24 01:12:19 +00:00
|
|
|
import { WEBUI_NAME, config, showChangelog } from '$lib/stores';
|
2024-02-25 19:55:15 +00:00
|
|
|
import { compareVersion } from '$lib/utils';
|
2024-03-02 20:38:51 +00:00
|
|
|
import { onMount, getContext } from 'svelte';
|
|
|
|
|
|
2024-04-03 17:26:24 +00:00
|
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
|
|
|
|
2024-03-02 20:38:51 +00:00
|
|
|
const i18n = getContext('i18n');
|
2024-02-05 09:58:54 +00:00
|
|
|
|
|
|
|
|
let ollamaVersion = '';
|
2024-02-25 19:55:15 +00:00
|
|
|
|
2024-02-25 20:10:14 +00:00
|
|
|
let updateAvailable = null;
|
2024-02-25 19:55:15 +00:00
|
|
|
let version = {
|
|
|
|
|
current: '',
|
|
|
|
|
latest: ''
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const checkForVersionUpdates = async () => {
|
2024-02-25 20:10:14 +00:00
|
|
|
updateAvailable = null;
|
2024-02-25 19:55:15 +00:00
|
|
|
version = await getVersionUpdates(localStorage.token).catch((error) => {
|
|
|
|
|
return {
|
|
|
|
|
current: WEBUI_VERSION,
|
|
|
|
|
latest: WEBUI_VERSION
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
console.log(version);
|
|
|
|
|
|
|
|
|
|
updateAvailable = compareVersion(version.latest, version.current);
|
|
|
|
|
console.log(updateAvailable);
|
|
|
|
|
};
|
|
|
|
|
|
2024-02-05 09:58:54 +00:00
|
|
|
onMount(async () => {
|
|
|
|
|
ollamaVersion = await getOllamaVersion(localStorage.token).catch((error) => {
|
|
|
|
|
return '';
|
|
|
|
|
});
|
2024-02-25 19:55:15 +00:00
|
|
|
|
|
|
|
|
checkForVersionUpdates();
|
2024-02-05 09:58:54 +00:00
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="flex flex-col h-full justify-between space-y-3 text-sm mb-6">
|
2024-11-13 06:43:18 +00:00
|
|
|
<div class=" space-y-3 overflow-y-scroll max-h-[28rem] lg:max-h-full">
|
2024-02-05 09:58:54 +00:00
|
|
|
<div>
|
2024-02-23 09:06:46 +00:00
|
|
|
<div class=" mb-2.5 text-sm font-medium flex space-x-2 items-center">
|
|
|
|
|
<div>
|
2024-03-14 13:38:05 +00:00
|
|
|
{$WEBUI_NAME}
|
|
|
|
|
{$i18n.t('Version')}
|
2024-02-23 09:06:46 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-02-25 19:55:15 +00:00
|
|
|
<div class="flex w-full justify-between items-center">
|
|
|
|
|
<div class="flex flex-col text-xs text-gray-700 dark:text-gray-200">
|
2024-04-03 17:26:24 +00:00
|
|
|
<div class="flex gap-1">
|
2024-05-26 07:49:30 +00:00
|
|
|
<Tooltip content={WEBUI_BUILD_HASH}>
|
2024-04-03 17:26:24 +00:00
|
|
|
v{WEBUI_VERSION}
|
|
|
|
|
</Tooltip>
|
2024-02-25 19:55:15 +00:00
|
|
|
|
|
|
|
|
<a
|
|
|
|
|
href="https://github.com/open-webui/open-webui/releases/tag/v{version.latest}"
|
|
|
|
|
target="_blank"
|
|
|
|
|
>
|
2024-02-25 20:10:14 +00:00
|
|
|
{updateAvailable === null
|
2024-03-04 08:53:56 +00:00
|
|
|
? $i18n.t('Checking for updates...')
|
2024-02-25 20:10:14 +00:00
|
|
|
: updateAvailable
|
2024-08-13 10:12:35 +00:00
|
|
|
? `(v${version.latest} ${$i18n.t('available!')})`
|
|
|
|
|
: $i18n.t('(latest)')}
|
2024-02-25 19:55:15 +00:00
|
|
|
</a>
|
2024-02-23 09:25:28 +00:00
|
|
|
</div>
|
2024-02-23 09:06:46 +00:00
|
|
|
|
|
|
|
|
<button
|
2024-02-23 09:26:07 +00:00
|
|
|
class=" underline flex items-center space-x-1 text-xs text-gray-500 dark:text-gray-500"
|
2024-02-23 09:06:46 +00:00
|
|
|
on:click={() => {
|
|
|
|
|
showChangelog.set(true);
|
|
|
|
|
}}
|
|
|
|
|
>
|
2024-03-04 08:53:56 +00:00
|
|
|
<div>{$i18n.t("See what's new")}</div>
|
2024-02-23 09:06:46 +00:00
|
|
|
</button>
|
2024-02-05 09:58:54 +00:00
|
|
|
</div>
|
2024-02-25 19:55:15 +00:00
|
|
|
|
|
|
|
|
<button
|
|
|
|
|
class=" text-xs px-3 py-1.5 bg-gray-100 hover:bg-gray-200 dark:bg-gray-850 dark:hover:bg-gray-800 transition rounded-lg font-medium"
|
|
|
|
|
on:click={() => {
|
|
|
|
|
checkForVersionUpdates();
|
|
|
|
|
}}
|
|
|
|
|
>
|
2024-03-04 08:53:56 +00:00
|
|
|
{$i18n.t('Check for updates')}
|
2024-02-25 19:55:15 +00:00
|
|
|
</button>
|
2024-02-05 09:58:54 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-02-25 01:56:53 +00:00
|
|
|
{#if ollamaVersion}
|
2025-02-16 03:27:25 +00:00
|
|
|
<hr class=" border-gray-100 dark:border-gray-850" />
|
2024-02-05 09:58:54 +00:00
|
|
|
|
2024-02-25 01:56:53 +00:00
|
|
|
<div>
|
2024-03-02 20:38:51 +00:00
|
|
|
<div class=" mb-2.5 text-sm font-medium">{$i18n.t('Ollama Version')}</div>
|
2024-02-25 01:56:53 +00:00
|
|
|
<div class="flex w-full">
|
|
|
|
|
<div class="flex-1 text-xs text-gray-700 dark:text-gray-200">
|
|
|
|
|
{ollamaVersion ?? 'N/A'}
|
|
|
|
|
</div>
|
2024-02-05 09:58:54 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-02-25 01:56:53 +00:00
|
|
|
{/if}
|
2024-02-05 09:58:54 +00:00
|
|
|
|
2025-02-16 03:27:25 +00:00
|
|
|
<hr class=" border-gray-100 dark:border-gray-850" />
|
2024-02-05 09:58:54 +00:00
|
|
|
|
2024-12-30 10:20:09 +00:00
|
|
|
<div class="mt-2 text-xs text-gray-400 dark:text-gray-500">
|
|
|
|
|
Emoji graphics provided by
|
|
|
|
|
<a href="https://github.com/jdecked/twemoji" target="_blank">Twemoji</a>, licensed under
|
|
|
|
|
<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">CC-BY 4.0</a>.
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-02-05 09:58:54 +00:00
|
|
|
<div class="flex space-x-1">
|
|
|
|
|
<a href="https://discord.gg/5rJgQTnV4s" target="_blank">
|
|
|
|
|
<img
|
|
|
|
|
alt="Discord"
|
2024-02-17 09:11:19 +00:00
|
|
|
src="https://img.shields.io/badge/Discord-Open_WebUI-blue?logo=discord&logoColor=white"
|
2024-02-05 09:58:54 +00:00
|
|
|
/>
|
|
|
|
|
</a>
|
|
|
|
|
|
2024-02-22 10:03:24 +00:00
|
|
|
<a href="https://twitter.com/OpenWebUI" target="_blank">
|
|
|
|
|
<img
|
|
|
|
|
alt="X (formerly Twitter) Follow"
|
|
|
|
|
src="https://img.shields.io/twitter/follow/OpenWebUI"
|
|
|
|
|
/>
|
|
|
|
|
</a>
|
|
|
|
|
|
2024-02-19 19:47:37 +00:00
|
|
|
<a href="https://github.com/open-webui/open-webui" target="_blank">
|
2024-02-05 09:58:54 +00:00
|
|
|
<img
|
|
|
|
|
alt="Github Repo"
|
2024-02-19 19:47:37 +00:00
|
|
|
src="https://img.shields.io/github/stars/open-webui/open-webui?style=social&label=Star us on Github"
|
2024-02-05 09:58:54 +00:00
|
|
|
/>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-01-10 19:46:35 +00:00
|
|
|
<div>
|
2025-03-04 10:45:05 +00:00
|
|
|
{#if $config?.license_metadata}
|
|
|
|
|
<div class="mb-2 text-xs">
|
|
|
|
|
{#if !$WEBUI_NAME.includes('Open WebUI')}
|
|
|
|
|
<span class=" text-gray-500 dark:text-gray-300 font-medium">{$WEBUI_NAME}</span> -
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<span class=" capitalize">{$config?.license_metadata?.type}</span> license purchased by
|
|
|
|
|
<span class=" capitalize">{$config?.license_metadata?.organization_name}</span>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
|
2025-01-10 19:46:35 +00:00
|
|
|
<pre
|
|
|
|
|
class="text-xs text-gray-400 dark:text-gray-500">Copyright (c) {new Date().getFullYear()} <a
|
|
|
|
|
href="https://openwebui.com"
|
|
|
|
|
target="_blank"
|
|
|
|
|
class="underline">Open WebUI (Timothy Jaeryang Baek)</a
|
|
|
|
|
>
|
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this
|
|
|
|
|
list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
|
this list of conditions and the following disclaimer in the documentation
|
|
|
|
|
and/or other materials provided with the distribution.
|
|
|
|
|
|
|
|
|
|
3. Neither the name of the copyright holder nor the names of its
|
|
|
|
|
contributors may be used to endorse or promote products derived from
|
|
|
|
|
this software without specific prior written permission.
|
|
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
|
|
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
|
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-02-05 09:58:54 +00:00
|
|
|
<div class="mt-2 text-xs text-gray-400 dark:text-gray-500">
|
2024-06-20 20:05:48 +00:00
|
|
|
{$i18n.t('Created by')}
|
2024-03-04 08:53:56 +00:00
|
|
|
<a
|
2024-02-05 09:58:54 +00:00
|
|
|
class=" text-gray-500 dark:text-gray-300 font-medium"
|
|
|
|
|
href="https://github.com/tjbck"
|
|
|
|
|
target="_blank">Timothy J. Baek</a
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|