Add current Wi-Fi without auto-trusting

This commit is contained in:
Davide De Rosa 2018-10-28 14:39:38 +01:00
parent ebe8c5836b
commit 474105d671
4 changed files with 11 additions and 4 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Changed
- Add current Wi-Fi to trusted networks list but don't trust it by default.
## 1.0 beta 1159 (2018-10-27)
### Fixed

View File

@ -98,7 +98,7 @@
//"service.cells.vpn_prefers_udp.caption" = "Prefer UDP socket";
"service.cells.trusted_mobile.caption" = "Cellular network";
"service.cells.trusted_wifi.caption" = "%@";
"service.cells.trusted_add_wifi.caption" = "Trust current Wi-Fi";
"service.cells.trusted_add_wifi.caption" = "Add current Wi-Fi";
"service.cells.trusted_policy.caption" = "Retain existing connection";
"service.cells.test_connectivity.caption" = "Test connectivity";
"service.cells.data_count.caption" = "Exchanged bytes count";

View File

@ -129,9 +129,10 @@ class TrustedNetworksModel {
return
}
let isTrusted = false
let rowIndex = rowIndexForWifi(at: index)
let completionHandler: () -> Void = {
self.trustedWifis[wifiToAdd] = true
self.trustedWifis[wifiToAdd] = isTrusted
if !isDuplicate {
self.sortedWifis.insert(wifiToAdd, at: index)
@ -140,7 +141,7 @@ class TrustedNetworksModel {
#endif
self.delegate?.trustedNetworks(self, shouldInsertWifiAt: rowIndex)
} else {
self.delegate?.trustedNetworks(self, shouldReloadWifiAt: rowIndex, isTrusted: true)
self.delegate?.trustedNetworks(self, shouldReloadWifiAt: rowIndex, isTrusted: isTrusted)
}
self.delegate?.trustedNetworksShouldReinstall(self)

View File

@ -624,7 +624,7 @@ internal enum L10n {
}
internal enum TrustedAddWifi {
/// Trust current Wi-Fi
/// Add current Wi-Fi
internal static let caption = L10n.tr("Localizable", "service.cells.trusted_add_wifi.caption")
}