Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
doums committed Jan 22, 2025
1 parent a8eb198 commit 9872c7a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion nym-vpn-app/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion nym-vpn-app/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ async fn main() -> Result<()> {
tokio::spawn(async move {
info!("starting vpn tunnel spy");
loop {
// TODO once grpc.tunnel_state is ready, make a call here
c_grpc.watch_tunnel_state(&handle).await.ok();
sleep(VPND_RETRY_INTERVAL).await;
debug!("vpn tunnel spy retry");
Expand Down
3 changes: 2 additions & 1 deletion nym-vpn-app/src/i18n/en/notifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"vpn-tunnel-state": {
"connected": "VPN tunnel connected",
"disconnected": "NymVPN has disconnected. To safeguard your privacy, please reconnect.",
"failed": "VPN tunnel connection failed!"
"error": "VPN tunnel failed: an error occurred",
"offline": "PC is offline. Please check your internet connection."
},
"logout": {
"success": "Logout successfull",
Expand Down
3 changes: 2 additions & 1 deletion nym-vpn-app/src/i18n/fr/notifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"vpn-tunnel-state": {
"connected": "connecté au tunnel VPN",
"disconnected": "NymVPN s'est déconnecté. Pour protéger votre vie privée, veuillez vous reconnecter.",
"failed": "la connexion au tunnel VPN a échoué !"
"error": "La connexion au tunnel VPN a échoué : une erreur est survenue.",
"offline": "Le PC est hors ligne. Veuillez vérifier votre connexion Internet."
},
"logout": {
"success": "Déconnexion réussie",
Expand Down
6 changes: 2 additions & 4 deletions nym-vpn-app/src/layers/EventNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ export default function EventNotification({
return;
}
if (isTunnelOffline(event.payload.state)) {
// TODO add localization
await notify('Device is offline', {
await notify(t('vpn-tunnel-state.offline'), {
locationPath: routes.root,
noSpamCheck: true,
});
return;
}
if (isTunnelError(event.payload.state)) {
// TODO add localization
await notify('VPN tunnel error', {
await notify(t('vpn-tunnel-state.error'), {
locationPath: routes.root,
noSpamCheck: true,
});
Expand Down

0 comments on commit 9872c7a

Please sign in to comment.