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

@@ -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);
}