Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
fix: Android releasable build
Vanalitefdf9f40aefdb
diff --git a/package.json b/package.jsonindex 99747edb0..1026a16e8 100644--- a/package.json+++ b/package.json@@ -26,11 +26,11 @@"serve:web-app": "yarn workspace @janhq/web-app serve:web","build:serve:web-app": "yarn build:web-app && yarn serve:web-app","dev:tauri": "yarn build:icon && yarn copy:assets:tauri && cross-env IS_CLEAN=true tauri dev",- "dev:ios": "yarn copy:assets:mobile && RUSTC_WRAPPER= yarn tauri ios dev --features mobile",- "dev:android": "yarn copy:assets:mobile && TAURI_ANDROID_BUILD=true yarn tauri android dev --features mobile",- "build:android": "yarn build && yarn copy:assets:mobile && TAURI_ANDROID_BUILD=true yarn tauri android build --no-default-features --features mobile",- "build:ios": "yarn build && yarn copy:assets:mobile && yarn tauri ios build --no-default-features --features mobile",- "build:ios:device": "yarn build && yarn copy:assets:mobile && yarn tauri ios build --no-default-features --features mobile --export-method debugging",+ "dev:ios": "yarn build:extensions-web && yarn copy:assets:mobile && RUSTC_WRAPPER= yarn tauri ios dev --features mobile",+ "dev:android": "yarn build:extensions-web && yarn copy:assets:mobile && cross-env IS_CLEAN=true TAURI_ANDROID_BUILD=true yarn tauri android dev --features mobile",+ "build:android": "yarn build:icon && yarn copy:assets:mobile && cross-env IS_CLEAN=true TAURI_ANDROID_BUILD=true yarn tauri android build -- --no-default-features --features mobile",+ "build:ios": "yarn copy:assets:mobile && yarn tauri ios build -- --no-default-features --features mobile",+ "build:ios:device": "yarn build:icon && yarn copy:assets:mobile && yarn tauri ios build -- --no-default-features --features mobile --export-method debugging","copy:assets:tauri": "cpx \"pre-install/*.tgz\" \"src-tauri/resources/pre-install/\" && cpx \"LICENSE\" \"src-tauri/resources/\"","copy:assets:mobile": "cpx \"pre-install/*.tgz\" \"src-tauri/resources/pre-install/\" && cpx \"LICENSE\" \"src-tauri/resources/\"","download:lib": "node ./scripts/download-lib.mjs",diff --git a/src-tauri/tauri b/src-tauri/taurinew file mode 100755index 000000000..f944754d6--- /dev/null+++ b/src-tauri/tauri@@ -0,0 +1,2 @@+#!/usr/bin/env node+import('../node_modules/@tauri-apps/cli/tauri.js');\ No newline at end of filediff --git a/src-tauri/tauri.android.conf.json b/src-tauri/tauri.android.conf.jsonindex a5136b851..a0b795207 100644--- a/src-tauri/tauri.android.conf.json+++ b/src-tauri/tauri.android.conf.json@@ -11,7 +11,10 @@},"plugins": {},"bundle": {- "resources": ["resources/LICENSE", "resources/pre-install"],- "externalBin": []+ "resources": ["resources/LICENSE"],+ "externalBin": [],+ "android": {+ "minSdkVersion": 24+ }}}\ No newline at end of filediff --git a/src-tauri/tauri.ios.conf.json b/src-tauri/tauri.ios.conf.jsonindex 53b1cff49..608514ac9 100644--- a/src-tauri/tauri.ios.conf.json+++ b/src-tauri/tauri.ios.conf.json@@ -15,7 +15,7 @@"iOS": {"developmentTeam": "<DEVELOPMENT_TEAM_ID>"},- "resources": ["resources/LICENSE", "resources/pre-install"],+ "resources": ["resources/LICENSE"],"externalBin": []}}\ No newline at end of filediff --git a/web-app/src/hooks/useAuth.ts b/web-app/src/hooks/useAuth.tsindex 7bca3b8f2..eec4c3b97 100644--- a/web-app/src/hooks/useAuth.ts+++ b/web-app/src/hooks/useAuth.ts@@ -69,7 +69,7 @@ const useAuthStore = create<AuthState>()((set, get) => ({if (!authService) {return []}- return authService.getAllProviders()+ return (authService as any).getAllProviders()},loginWithProvider: async (providerId: ProviderType) => {@@ -78,7 +78,7 @@ const useAuthStore = create<AuthState>()((set, get) => ({throw new Error('Authentication not available on this platform')}- await authService.loginWithProvider(providerId)+ await (authService as any).loginWithProvider(providerId)},handleProviderCallback: async (@@ -91,7 +91,7 @@ const useAuthStore = create<AuthState>()((set, get) => ({throw new Error('Authentication not available on this platform')}- await authService.handleProviderCallback(providerId, code, state)+ await (authService as any).handleProviderCallback(providerId, code, state)// Reload auth state after successful callbackawait loadAuthState()},@@ -102,7 +102,7 @@ const useAuthStore = create<AuthState>()((set, get) => ({return false}- return authService.isAuthenticatedWithProvider(providerId)+ return (authService as any).isAuthenticatedWithProvider(providerId)},logout: async () => {@@ -133,7 +133,7 @@ const useAuthStore = create<AuthState>()((set, get) => ({}try {- const profile = await authService.getCurrentUser(forceRefresh)+ const profile = await (authService as any).getCurrentUser(forceRefresh)set({user: profile,isAuthenticated: profile !== null,@@ -156,11 +156,11 @@ const useAuthStore = create<AuthState>()((set, get) => ({set({ isLoading: true })// Check if user is authenticated with any provider- const isAuth = authService.isAuthenticated()+ const isAuth = (authService as any).isAuthenticated()// Load user profile if authenticatedif (isAuth) {- const profile = await authService.getCurrentUser(forceRefresh)+ const profile = await (authService as any).getCurrentUser(forceRefresh)set({user: profile,isAuthenticated: profile !== null,@@ -184,12 +184,12 @@ const useAuthStore = create<AuthState>()((set, get) => ({subscribeToAuthEvents: (callback: (event: MessageEvent) => void) => {const { authService } = get()- if (!authService || typeof authService.onAuthEvent !== 'function') {+ if (!authService || typeof (authService as any).onAuthEvent !== 'function') {return () => {} // Return no-op cleanup}try {- return authService.onAuthEvent(callback)+ return (authService as any).onAuthEvent(callback)} catch (error) {console.warn('Failed to subscribe to auth events:', error)return () => {}diff --git a/web-app/src/routes/threads/$threadId.tsx b/web-app/src/routes/threads/$threadId.tsxindex 22d0da99c..57b09de0a 100644--- a/web-app/src/routes/threads/$threadId.tsx+++ b/web-app/src/routes/threads/$threadId.tsx@@ -16,8 +16,6 @@ import DropdownAssistant from '@/containers/DropdownAssistant'import { useAssistant } from '@/hooks/useAssistant'import { useAppearance } from '@/hooks/useAppearance'import { ContentType, ThreadMessage } from '@janhq/core'-import { useTranslation } from '@/i18n/react-i18next-compat'-import { useChat } from '@/hooks/useChat'import { useSmallScreen, useMobileScreen } from '@/hooks/useMediaQuery'import { useTools } from '@/hooks/useTools'import { PlatformFeatures } from '@/lib/platform/const'