From 918af38a79bb37466555cc6f36dd9bb853162fd6 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 15 Sep 2022 15:36:43 -0700 Subject: [PATCH] implement update notif into UI --- package.json | 2 +- packages/backend/src/server/api/endpoints/latest-version.ts | 2 -- packages/client/src/pages/admin/index.vue | 4 +++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 14528c7422..adc820617c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/backend/src/server/api/endpoints/latest-version.ts b/packages/backend/src/server/api/endpoints/latest-version.ts index 9eafbc3c68..c0b5cb4988 100644 --- a/packages/backend/src/server/api/endpoints/latest-version.ts +++ b/packages/backend/src/server/api/endpoints/latest-version.ts @@ -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; }); diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue index e78c2557b2..4c4e4c90a6 100644 --- a/packages/client/src/pages/admin/index.vue +++ b/packages/client/src/pages/admin/index.vue @@ -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;