implement update notif into UI

This commit is contained in:
ThatOneCalculator 2022-09-15 15:36:43 -07:00
parent e9445561fd
commit 918af38a79
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "12.119.0-calc.1-rc.7",
"version": "12.119.0-calc.1-rc.8",
"codename": "aqua",
"repository": {
"type": "git",

View File

@ -19,8 +19,6 @@ export default define(meta, paramDef, async () => {
await fetch('https://codeberg.org/api/v1/repos/thatonecalculator/calckey/releases?draft=false&pre-release=false&page=1&limit=1')
.then((response) => response.json())
.then((data) => {
console.log(data[0]);
console.log(data[0].tag_name);
tag_name = data[0].tag_name;
});

View File

@ -69,7 +69,9 @@ os.api('admin/abuse-user-reports', {
});
os.api('latest-version').then(res => {
console.log(res);
if (res?.tag_name !== version) {
updateAvailable = true;
}
});
const NARROW_THRESHOLD = 600;