mobile update

This commit is contained in:
arrelin
2026-03-10 14:11:35 +03:00
parent 265c29d542
commit 45eefeb1f5
12 changed files with 107 additions and 68 deletions

View File

@@ -11,6 +11,7 @@
"@tailwindcss/postcss": "^4.1.18",
"@tauri-apps/api": "^2.10.1",
"@tauri-apps/plugin-deep-link": "^2.4.7",
"@tauri-apps/plugin-opener": "^2.5.3",
"@tauri-apps/plugin-shell": "^2.3.5",
"axios": "^1.13.2",
"i18next": "^25.8.0",
@@ -1630,6 +1631,15 @@
"@tauri-apps/api": "^2.10.1"
}
},
"node_modules/@tauri-apps/plugin-opener": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.5.3.tgz",
"integrity": "sha512-CCcUltXMOfUEArbf3db3kCE7Ggy1ExBEBl51Ko2ODJ6GDYHRp1nSNlQm5uNCFY5k7/ufaK5Ib3Du/Zir19IYQQ==",
"license": "MIT OR Apache-2.0",
"dependencies": {
"@tauri-apps/api": "^2.8.0"
}
},
"node_modules/@tauri-apps/plugin-shell": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.3.5.tgz",

View File

@@ -13,6 +13,7 @@
"@tailwindcss/postcss": "^4.1.18",
"@tauri-apps/api": "^2.10.1",
"@tauri-apps/plugin-deep-link": "^2.4.7",
"@tauri-apps/plugin-opener": "^2.5.3",
"@tauri-apps/plugin-shell": "^2.3.5",
"axios": "^1.13.2",
"i18next": "^25.8.0",

View File

@@ -51,17 +51,17 @@ export default function Login() {
setError('');
if (isTauriEnv()) {
const { open } = await import('@tauri-apps/plugin-shell');
const { openUrl } = await import('@tauri-apps/plugin-opener');
const response = await authApi.getGoogleAuthUrl(undefined, true);
await open(response.data.url);
await openUrl(response.data.url);
return;
}
const currentUrl = window.location.origin;
const response = await authApi.getGoogleAuthUrl(currentUrl);
window.location.href = response.data.url;
} catch (err) {
setError(t('login.authError'));
} catch (err: any) {
setError(String(err?.message || err));
console.error(err);
setLoading(false);
}

View File

@@ -8,7 +8,9 @@ export default defineConfig({
host: process.env.TAURI_DEV_HOST || 'localhost',
proxy: {
'/api': {
target: 'http://localhost:8080',
target: process.env.TAURI_DEV_HOST
? 'https://family-budget.duckdns.org'
: 'http://localhost:8080',
changeOrigin: true,
}
}