fix: handle preflight on tauri apps (#776)

This commit is contained in:
Huang Xin
2025-03-31 09:38:47 +08:00
committed by GitHub
parent d89834a53d
commit 39fb7f759e
20 changed files with 48 additions and 22 deletions
@@ -103,7 +103,11 @@ const DeepLPopup: React.FC<DeepLPopupProps> = ({
setTranslation(translatedText);
} catch (err) {
console.error(err);
setError(_('Unable to fetch the translation. Try again later.'));
if (!token) {
setError(_('Unable to fetch the translation. Please log in first and try again.'));
} else {
setError(_('Unable to fetch the translation. Try again later.'));
}
} finally {
setLoading(false);
}