forked from open-webui/open-webui
feat: check for updates
This commit is contained in:
parent
6bfe2a6306
commit
759883a4c8
8 changed files with 91 additions and 14 deletions
|
@ -101,11 +101,10 @@ export const copyToClipboard = (text) => {
|
|||
);
|
||||
};
|
||||
|
||||
export const checkVersion = (required, current) => {
|
||||
// Returns true when current version is below required
|
||||
export const compareVersion = (latest, current) => {
|
||||
return current === '0.0.0'
|
||||
? false
|
||||
: current.localeCompare(required, undefined, {
|
||||
: current.localeCompare(latest, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: 'case',
|
||||
caseFirst: 'upper'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue