Add trusted Wi-Fi with explicit name
This commit is contained in:
parent
b4b5782c58
commit
5cd416feb1
|
@ -5,7 +5,11 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## 1.13.0 Beta 2405 (2020-11-15)
|
## Unreleased
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Enter explicit Wi-Fi SSID to trust.
|
||||||
|
|
||||||
## 1.12.1 (2020-11-15)
|
## 1.12.1 (2020-11-15)
|
||||||
|
|
||||||
|
|
|
@ -430,15 +430,20 @@ class ServiceViewController: UIViewController, StrongTableHost {
|
||||||
IntentDispatcher.donateUntrustCurrentNetwork()
|
IntentDispatcher.donateUntrustCurrentNetwork()
|
||||||
}
|
}
|
||||||
|
|
||||||
guard trustedNetworks.addCurrentWifi() else {
|
let alert = UIAlertController.asAlert(L10n.Core.Service.Sections.Trusted.header, nil)
|
||||||
let alert = UIAlertController.asAlert(
|
alert.addTextField { (field) in
|
||||||
L10n.Core.Service.Sections.Trusted.header,
|
field.text = Utils.currentWifiNetworkName() ?? ""
|
||||||
L10n.Core.Service.Alerts.Trusted.NoNetwork.message
|
field.applyHostTitle(.current)
|
||||||
)
|
field.delegate = self
|
||||||
alert.addCancelAction(L10n.Core.Global.ok)
|
|
||||||
present(alert, animated: true, completion: nil)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
alert.addCancelAction(L10n.Core.Global.cancel)
|
||||||
|
alert.addPreferredAction(L10n.Core.Global.ok) {
|
||||||
|
guard let wifi = alert.textFields?.first?.text else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self.trustedNetworks.addWifi(wifi)
|
||||||
|
}
|
||||||
|
present(alert, animated: true, completion: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func toggleTrustWiFi(cell: ToggleTableViewCell, at row: Int) {
|
private func toggleTrustWiFi(cell: ToggleTableViewCell, at row: Int) {
|
||||||
|
|
Loading…
Reference in New Issue