Hide yubikey for unsupported devices
This commit is contained in:
parent
cdaf60da73
commit
3edf8efbc5
1 changed files with 9 additions and 6 deletions
|
|
@ -10,6 +10,7 @@ import CoreData
|
|||
import passKit
|
||||
import SVProgressHUD
|
||||
import UIKit
|
||||
import YubiKit
|
||||
|
||||
class SettingsTableViewController: UITableViewController, UITabBarControllerDelegate {
|
||||
@IBOutlet var pgpKeyTableViewCell: UITableViewCell!
|
||||
|
|
@ -184,12 +185,14 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
|
|||
)
|
||||
}
|
||||
|
||||
if YubiKitDeviceCapabilities.supportsMFIAccessoryKey {
|
||||
optionMenu.addAction(
|
||||
UIAlertAction(title: Defaults.isYubiKeyEnabled ? "✓ YubiKey" : "YubiKey", style: .default) { _ in
|
||||
Defaults.isYubiKeyEnabled.toggle()
|
||||
self.setPGPKeyTableViewCellDetailText()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if Defaults.pgpKeySource != nil {
|
||||
optionMenu.addAction(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue