diff --git a/package.json b/package.json index 570fea69..2cd34f42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "betterlectio", - "version": "0.10.99", + "version": "0.10.100", "private": true, "scripts": { "dev": "vite dev", diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7bb7776c..c5d1f5c5 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -24,6 +24,7 @@ else if (app === 'none') localStorage.removeItem('mobile'); let appVersion = null; + let backendVersion = null; let windowWidth = window.innerWidth; window.addEventListener('resize', () => { @@ -43,6 +44,10 @@ if (await window.navigator.userAgent.includes('BetterLectio Mobile')) { const _version = await fetch(`${api}/app_version`); appVersion = await _version.text(); + + const _backendVersion = await fetch('https://raw.githubusercontent.com/BetterLectio/python-lectio/main/setup.py'); + // eslint-disable-next-line prefer-destructuring + backendVersion = (await _backendVersion.text()).match(/VERSION = '\d+\.\d+\.\d+'/gu)[0].split("'")[1]; } }); @@ -94,7 +99,7 @@ -{#if appVersion && appVersion !== version} +{#if appVersion && appVersion !== backendVersion}

BetterLectio skal opdateres