Merge pull request #15483 from headwAI-GmbH/support-deactivate-update-check

feat: Support deactivate update check without OFFLINE_MODE
This commit is contained in:
Tim Jaeryang Baek
2025-07-03 17:22:22 +04:00
committed by GitHub
8 changed files with 44 additions and 35 deletions

View File

@@ -119,7 +119,9 @@
>
<button
aria-hidden={models.length <= 1}
aria-label={$i18n.t('Get information on {{name}} in the UI', { name: models[modelIdx]?.name})}
aria-label={$i18n.t('Get information on {{name}} in the UI', {
name: models[modelIdx]?.name
})}
on:click={() => {
selectedModelIdx = modelIdx;
}}

View File

@@ -38,7 +38,7 @@
return '';
});
if (!$config?.offline_mode) {
if ($config?.features?.enable_version_update_check) {
checkForVersionUpdates();
}
});
@@ -60,16 +60,18 @@
v{WEBUI_VERSION}
</Tooltip>
<a
href="https://github.com/open-webui/open-webui/releases/tag/v{version.latest}"
target="_blank"
>
{updateAvailable === null
? $i18n.t('Checking for updates...')
: updateAvailable
? `(v${version.latest} ${$i18n.t('available!')})`
: $i18n.t('(latest)')}
</a>
{#if $config?.features?.enable_version_update_check}
<a
href="https://github.com/open-webui/open-webui/releases/tag/v{version.latest}"
target="_blank"
>
{updateAvailable === null
? $i18n.t('Checking for updates...')
: updateAvailable
? `(v${version.latest} ${$i18n.t('available!')})`
: $i18n.t('(latest)')}
</a>
{/if}
</div>
<button
@@ -82,7 +84,7 @@
</button>
</div>
{#if $config?.offline_mode}
{#if $config?.features?.enable_version_update_check}
<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={() => {