Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
chore: able to disable updater via env flag
Louisb8070f1871a5
diff --git a/web-app/src/providers/DataProvider.tsx b/web-app/src/providers/DataProvider.tsxindex dcfacd536..6110f9dd5 100644--- a/web-app/src/providers/DataProvider.tsx+++ b/web-app/src/providers/DataProvider.tsx@@ -62,7 +62,12 @@ export function DataProvider() {// Check for app updatesuseEffect(() => {- checkForUpdate()+ // Only check for updates if the auto updater is not disabled+ // App might be distributed via other package managers+ // or methods that handle updates differently+ if (!AUTO_UPDATER_DISABLED) {+ checkForUpdate()+ }}, [checkForUpdate])const handleDeepLink = (urls: string[] | null) => {diff --git a/web-app/src/types/global.d.ts b/web-app/src/types/global.d.tsindex fe33f3d46..b104314b0 100644--- a/web-app/src/types/global.d.ts+++ b/web-app/src/types/global.d.ts@@ -19,6 +19,7 @@ declare global {declare const POSTHOG_KEY: stringdeclare const POSTHOG_HOST: stringdeclare const MODEL_CATALOG_URL: string+ declare const AUTO_UPDATER_DISABLED: booleaninterface Window {core: AppCore | undefined}diff --git a/web-app/vite.config.ts b/web-app/vite.config.tsindex 697c1a64f..4c1b2ab40 100644--- a/web-app/vite.config.ts+++ b/web-app/vite.config.ts@@ -33,19 +33,19 @@ export default defineConfig(({ mode }) => {define: {IS_TAURI: JSON.stringify(process.env.IS_TAURI),IS_MACOS: JSON.stringify(- process.env.TAURI_ENV_PLATFORM?.includes('darwin') ?? 'false'+ process.env.TAURI_ENV_PLATFORM?.includes('darwin') ?? false),IS_WINDOWS: JSON.stringify(- process.env.TAURI_ENV_PLATFORM?.includes('windows') ?? 'false'+ process.env.TAURI_ENV_PLATFORM?.includes('windows') ?? false),IS_LINUX: JSON.stringify(- process.env.TAURI_ENV_PLATFORM?.includes('linux') ?? 'false'+ process.env.TAURI_ENV_PLATFORM?.includes('linux') ?? false),IS_IOS: JSON.stringify(- process.env.TAURI_ENV_PLATFORM?.includes('ios') ?? 'false'+ process.env.TAURI_ENV_PLATFORM?.includes('ios') ?? false),IS_ANDROID: JSON.stringify(- process.env.TAURI_ENV_PLATFORM?.includes('android') ?? 'false'+ process.env.TAURI_ENV_PLATFORM?.includes('android') ?? false),PLATFORM: JSON.stringify(process.env.TAURI_ENV_PLATFORM),@@ -56,6 +56,9 @@ export default defineConfig(({ mode }) => {MODEL_CATALOG_URL: JSON.stringify('https://raw.githubusercontent.com/menloresearch/model-catalog/main/model_catalog.json'),+ AUTO_UPDATER_DISABLED: JSON.stringify(+ env.AUTO_UPDATER_DISABLED === 'true'+ ),},// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`