fix: avoid 'checking for updates...' always present in offline-mode

This commit is contained in:
guenhter 2025-07-02 14:50:52 +02:00
parent 34ddd62951
commit 661ea773f4
4 changed files with 30 additions and 25 deletions

View file

@ -33,7 +33,6 @@
</script> </script>
<script> <script>
// On page load or when changing themes, best to add inline in `head` to avoid FOUC // On page load or when changing themes, best to add inline in `head` to avoid FOUC
(() => { (() => {
const metaThemeColorTag = document.querySelector('meta[name="theme-color"]'); const metaThemeColorTag = document.querySelector('meta[name="theme-color"]');
@ -82,10 +81,11 @@
const logo = document.createElement('img'); const logo = document.createElement('img');
logo.id = 'logo'; logo.id = 'logo';
logo.style = "position: absolute; width: auto; height: 6rem; top: 44%; left: 50%; transform: translateX(-50%); display:block;"; logo.style =
'position: absolute; width: auto; height: 6rem; top: 44%; left: 50%; transform: translateX(-50%); display:block;';
logo.src = isDarkMode ? '/static/splash-dark.png' : '/static/splash.png'; logo.src = isDarkMode ? '/static/splash-dark.png' : '/static/splash.png';
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function () {
const splash = document.getElementById('splash-screen'); const splash = document.getElementById('splash-screen');
if (splash) splash.prepend(logo); if (splash) splash.prepend(logo);
}); });
@ -110,7 +110,6 @@
} }
</style> </style>
<div <div
style=" style="
position: absolute; position: absolute;

View file

@ -139,6 +139,7 @@
v{WEBUI_VERSION} v{WEBUI_VERSION}
</Tooltip> </Tooltip>
{#if $config?.features?.enable_version_update_check}
<a <a
href="https://github.com/open-webui/open-webui/releases/tag/v{version.latest}" href="https://github.com/open-webui/open-webui/releases/tag/v{version.latest}"
target="_blank" target="_blank"
@ -149,6 +150,7 @@
? `(v${version.latest} ${$i18n.t('available!')})` ? `(v${version.latest} ${$i18n.t('available!')})`
: $i18n.t('(latest)')} : $i18n.t('(latest)')}
</a> </a>
{/if}
</div> </div>
<button <button

View file

@ -119,7 +119,9 @@
> >
<button <button
aria-hidden={models.length <= 1} 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={() => { on:click={() => {
selectedModelIdx = modelIdx; selectedModelIdx = modelIdx;
}} }}

View file

@ -60,6 +60,7 @@
v{WEBUI_VERSION} v{WEBUI_VERSION}
</Tooltip> </Tooltip>
{#if $config?.features?.enable_version_update_check}
<a <a
href="https://github.com/open-webui/open-webui/releases/tag/v{version.latest}" href="https://github.com/open-webui/open-webui/releases/tag/v{version.latest}"
target="_blank" target="_blank"
@ -70,6 +71,7 @@
? `(v${version.latest} ${$i18n.t('available!')})` ? `(v${version.latest} ${$i18n.t('available!')})`
: $i18n.t('(latest)')} : $i18n.t('(latest)')}
</a> </a>
{/if}
</div> </div>
<button <button