Add title to configuration parameter selector
This commit is contained in:
parent
e3d2d54226
commit
c6d632ede4
|
@ -296,9 +296,12 @@ extension ConfigurationViewController: UITableViewDataSource, UITableViewDelegat
|
||||||
fatalError("Table should not allow selection when isEditable is false")
|
fatalError("Table should not allow selection when isEditable is false")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let settingCell = tableView.cellForRow(at: indexPath) as? SettingTableViewCell
|
||||||
|
|
||||||
switch model.row(at: indexPath) {
|
switch model.row(at: indexPath) {
|
||||||
case .cipher:
|
case .cipher:
|
||||||
let vc = OptionViewController<SessionProxy.Cipher>()
|
let vc = OptionViewController<SessionProxy.Cipher>()
|
||||||
|
vc.title = settingCell?.leftText
|
||||||
vc.options = [.aes128cbc, .aes192cbc, .aes256cbc, .aes128gcm, .aes192gcm, .aes256gcm]
|
vc.options = [.aes128cbc, .aes192cbc, .aes256cbc, .aes128gcm, .aes192gcm, .aes256gcm]
|
||||||
vc.selectedOption = configuration.cipher
|
vc.selectedOption = configuration.cipher
|
||||||
vc.descriptionBlock = { $0.description }
|
vc.descriptionBlock = { $0.description }
|
||||||
|
@ -314,6 +317,7 @@ extension ConfigurationViewController: UITableViewDataSource, UITableViewDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
let vc = OptionViewController<SessionProxy.Digest>()
|
let vc = OptionViewController<SessionProxy.Digest>()
|
||||||
|
vc.title = settingCell?.leftText
|
||||||
vc.options = [.sha1, .sha224, .sha256, .sha384, .sha512]
|
vc.options = [.sha1, .sha224, .sha256, .sha384, .sha512]
|
||||||
vc.selectedOption = configuration.digest
|
vc.selectedOption = configuration.digest
|
||||||
vc.descriptionBlock = { $0.description }
|
vc.descriptionBlock = { $0.description }
|
||||||
|
@ -325,6 +329,7 @@ extension ConfigurationViewController: UITableViewDataSource, UITableViewDelegat
|
||||||
|
|
||||||
case .compressionFrame:
|
case .compressionFrame:
|
||||||
let vc = OptionViewController<SessionProxy.CompressionFraming>()
|
let vc = OptionViewController<SessionProxy.CompressionFraming>()
|
||||||
|
vc.title = settingCell?.leftText
|
||||||
vc.options = [.disabled, .compLZO, .compress]
|
vc.options = [.disabled, .compLZO, .compress]
|
||||||
vc.selectedOption = configuration.compressionFraming
|
vc.selectedOption = configuration.compressionFraming
|
||||||
vc.descriptionBlock = { $0.cellDescription }
|
vc.descriptionBlock = { $0.cellDescription }
|
||||||
|
|
Loading…
Reference in New Issue