public Task OnVpnStateChanged(VpnStateChangedEventArgs e) { if (e.State.Status == VpnStatus.Connected && _proxy.Enabled() && !_modalShown) { _modalShown = true; _dialogs.ShowWarning(Translation.Get("Dialogs_Proxy_msg_ProxyDetected")); } if (e.State.Status == VpnStatus.Disconnected) { _modalShown = false; } return(Task.CompletedTask); }
private void HandleNoServersAvailable(IReadOnlyCollection <Server> candidates, Profile profile) { if (profile.ProfileType == ProfileType.Custom) { HandleNoCustomServerAvailable(candidates.FirstOrDefault()); return; } if ((profile.Features.IsSecureCore() || profile.IsPredefined && _appSettings.SecureCore) && _userStorage.User().MaxTier < ServerTiers.Plus) { _modals.Show <ScUpsellModalViewModel>(); return; } if (!string.IsNullOrEmpty(profile.CountryCode)) { HandleNoCountryServersAvailable(candidates); return; } if (!candidates.Any()) { _dialogs.ShowWarning(StringResources.Get("Profiles_msg_NoServersAvailable")); return; } var userTierServers = candidates.UpToTierServers(_userStorage.User().MaxTier); if (!userTierServers.Any()) { if (candidates.BasicServers().Any()) { _modals.Show <UpsellModalViewModel>(); return; } if (candidates.PlusServers().Any()) { _modals.Show <PlusUpsellModalViewModel>(); return; } } if (!candidates.OnlineServers().Any()) { _dialogs.ShowWarning(StringResources.Get("Profiles_msg_AllServersOffline")); return; } _modals.Show <NoServerDueTierUpsellModalViewModel>(); }
private void ShowBlockedTrafficModal() { _dialogs.ShowWarning(StringResources.Get("Dialogs_P2PBlocked_msg_Blocked")); }
private void ShowBlockedTrafficModal() { _dialogs.ShowWarning(Translation.Get("Dialogs_P2PBlocked_msg_Blocked")); }