mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 19:45:35 +01:00
drop more dependencies + remove updater
This commit is contained in:
parent
e667928863
commit
8965d60516
8 changed files with 1122 additions and 890 deletions
|
|
@ -7,7 +7,6 @@ import {
|
|||
THEME_CONFIG,
|
||||
VERSION_CHECK,
|
||||
} from 'lib/constants';
|
||||
import semver from 'semver';
|
||||
|
||||
const app = createSlice({
|
||||
name: 'app',
|
||||
|
|
@ -17,7 +16,6 @@ const app = createSlice({
|
|||
versions: {
|
||||
current: process.env.VERSION,
|
||||
latest: null,
|
||||
hasUpdate: false,
|
||||
},
|
||||
shareToken: null,
|
||||
},
|
||||
|
|
@ -74,13 +72,11 @@ export function checkVersion() {
|
|||
|
||||
const latest = tag_name.startsWith('v') ? tag_name.slice(1) : tag_name;
|
||||
const lastCheck = getItem(VERSION_CHECK);
|
||||
const hasUpdate = latest && semver.gt(latest, current) && lastCheck?.version !== latest;
|
||||
|
||||
return dispatch(
|
||||
setVersions({
|
||||
current,
|
||||
latest,
|
||||
hasUpdate,
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue