mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-14 15:52:31 +00:00
feat: add env variable to disable update check
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { version as currentVersion } from '$app/environment';
|
||||
import { env } from '$env/dynamic/private';
|
||||
import AppConfigService from '$lib/services/app-config-service';
|
||||
import type { AppVersionInformation } from '$lib/types/application-configuration';
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
@@ -6,6 +8,14 @@ let versionInformation: AppVersionInformation;
|
||||
let versionInformationLastUpdated: number;
|
||||
|
||||
export const load: LayoutServerLoad = async () => {
|
||||
if (env.UPDATE_CHECK_DISABLED === 'true') {
|
||||
return {
|
||||
versionInformation: {
|
||||
currentVersion: currentVersion
|
||||
} satisfies AppVersionInformation
|
||||
};
|
||||
}
|
||||
|
||||
const appConfigService = new AppConfigService();
|
||||
|
||||
// Cache the version information for 3 hours
|
||||
|
||||
Reference in New Issue
Block a user