mobile update
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user