forked from open-webui/open-webui
Merge pull request #911 from open-webui/check-updates
fix: check version loading progress
This commit is contained in:
commit
129bb21a0a
1 changed files with 7 additions and 2 deletions
|
@ -8,13 +8,14 @@
|
||||||
|
|
||||||
let ollamaVersion = '';
|
let ollamaVersion = '';
|
||||||
|
|
||||||
let updateAvailable = false;
|
let updateAvailable = null;
|
||||||
let version = {
|
let version = {
|
||||||
current: '',
|
current: '',
|
||||||
latest: ''
|
latest: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkForVersionUpdates = async () => {
|
const checkForVersionUpdates = async () => {
|
||||||
|
updateAvailable = null;
|
||||||
version = await getVersionUpdates(localStorage.token).catch((error) => {
|
version = await getVersionUpdates(localStorage.token).catch((error) => {
|
||||||
return {
|
return {
|
||||||
current: WEBUI_VERSION,
|
current: WEBUI_VERSION,
|
||||||
|
@ -54,7 +55,11 @@
|
||||||
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"
|
||||||
>
|
>
|
||||||
{updateAvailable ? `(v${version.latest} available!)` : '(latest)'}
|
{updateAvailable === null
|
||||||
|
? 'Checking for updates...'
|
||||||
|
: updateAvailable
|
||||||
|
? `(v${version.latest} available!)`
|
||||||
|
: '(latest)'}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue