Add ignore .gpg-id switch default ON
This commit is contained in:
parent
6280b1522b
commit
a62792bd11
9 changed files with 91 additions and 13 deletions
|
|
@ -46,6 +46,15 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
return uiSwitch
|
||||
}()
|
||||
|
||||
let ignoreGPGIDSwitch: UISwitch = {
|
||||
let uiSwitch = UISwitch()
|
||||
uiSwitch.onTintColor = Colors.systemBlue
|
||||
uiSwitch.sizeToFit()
|
||||
uiSwitch.addTarget(self, action: #selector(ignoreGPGIDSwitchAction(_:)), for: UIControl.Event.valueChanged)
|
||||
uiSwitch.isOn = Defaults.isIgnoreGPGIDOn
|
||||
return uiSwitch
|
||||
}()
|
||||
|
||||
let showFolderSwitch: UISwitch = {
|
||||
let uiSwitch = UISwitch()
|
||||
uiSwitch.onTintColor = Colors.systemBlue
|
||||
|
|
@ -77,6 +86,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
|
||||
// section 2
|
||||
[
|
||||
[.title: "IgnoreGPGID".localize(), .action: "none"],
|
||||
[.title: "ShowFolders".localize(), .action: "none"],
|
||||
[.title: "HidePasswordImages".localize(), .action: "none"],
|
||||
[.title: "HideUnknownFields".localize(), .action: "none"],
|
||||
|
|
@ -129,6 +139,10 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
cell.accessoryType = .none
|
||||
cell.selectionStyle = .none
|
||||
cell.accessoryView = showFolderSwitch
|
||||
case "IgnoreGPGID".localize():
|
||||
cell.accessoryType = .none
|
||||
cell.selectionStyle = .none
|
||||
cell.accessoryView = ignoreGPGIDSwitch
|
||||
case "HidePasswordImages".localize():
|
||||
cell.accessoryType = .none
|
||||
let detailButton = UIButton(type: .detailDisclosure)
|
||||
|
|
@ -206,6 +220,11 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
NotificationCenter.default.post(name: .passwordDisplaySettingChanged, object: nil)
|
||||
}
|
||||
|
||||
@objc
|
||||
func ignoreGPGIDSwitchAction(_: Any?) {
|
||||
Defaults.isIgnoreGPGIDOn = ignoreGPGIDSwitch.isOn
|
||||
}
|
||||
|
||||
@objc
|
||||
func hidePasswordImagesSwitchAction(_: Any?) {
|
||||
Defaults.isHidePasswordImagesOn = hidePasswordImagesSwitch.isOn
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
"PasswordGeneratorFlavor" = "Style";
|
||||
"RememberPgpKeyPassphrase" = "Remember PGP Key Passphrase";
|
||||
"RememberGitCredentialPassphrase" = "Remember Git Credential Passphrase";
|
||||
"IgnoreGPGID" = "Ignore .gpg-id";
|
||||
"ShowFolders" = "Show Folders";
|
||||
"HidePasswordImages" = "Hide Password Images";
|
||||
"HidePasswordImagesExplanation." = "Associated favicon images are loaded and shown based upon the URL associated with an entry. Enable this option to hide these images and prevent them from being loaded.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue