lint: delete trailing whitespaces
This commit is contained in:
parent
2ba6917710
commit
ed387069a4
59 changed files with 624 additions and 623 deletions
|
|
@ -19,7 +19,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
uiSwitch.addTarget(self, action: #selector(hideUnknownSwitchAction(_:)), for: UIControlEvents.valueChanged)
|
||||
return uiSwitch
|
||||
}()
|
||||
|
||||
|
||||
let hideOTPSwitch: UISwitch = {
|
||||
let uiSwitch = UISwitch()
|
||||
uiSwitch.onTintColor = Globals.blue
|
||||
|
|
@ -27,7 +27,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
uiSwitch.addTarget(self, action: #selector(hideOTPSwitchAction(_:)), for: UIControlEvents.valueChanged)
|
||||
return uiSwitch
|
||||
}()
|
||||
|
||||
|
||||
let rememberPGPPassphraseSwitch: UISwitch = {
|
||||
let uiSwitch = UISwitch()
|
||||
uiSwitch.onTintColor = Globals.blue
|
||||
|
|
@ -36,7 +36,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
uiSwitch.isOn = SharedDefaults[.isRememberPGPPassphraseOn]
|
||||
return uiSwitch
|
||||
}()
|
||||
|
||||
|
||||
let rememberGitCredentialPassphraseSwitch: UISwitch = {
|
||||
let uiSwitch = UISwitch()
|
||||
uiSwitch.onTintColor = Globals.blue
|
||||
|
|
@ -45,7 +45,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
uiSwitch.isOn = SharedDefaults[.isRememberGitCredentialPassphraseOn]
|
||||
return uiSwitch
|
||||
}()
|
||||
|
||||
|
||||
let showFolderSwitch: UISwitch = {
|
||||
let uiSwitch = UISwitch()
|
||||
uiSwitch.onTintColor = Globals.blue
|
||||
|
|
@ -59,12 +59,12 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
tableData = [
|
||||
// section 0
|
||||
[[.title: "About Repository", .action: "segue", .link: "showAboutRepositorySegue"],],
|
||||
|
||||
|
||||
// section 1
|
||||
[
|
||||
[.title: "Password Generator Flavor", .action: "none", .style: CellDataStyle.value1],
|
||||
],
|
||||
|
||||
|
||||
// section 2
|
||||
[
|
||||
[.title: "Remember PGP Key Passphrase", .action: "none",],
|
||||
|
|
@ -78,9 +78,9 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
|
||||
]
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = super.tableView(tableView, cellForRowAt: indexPath)
|
||||
switch cell.textLabel!.text! {
|
||||
|
|
@ -127,7 +127,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
}
|
||||
return cell
|
||||
}
|
||||
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
super.tableView(tableView, didSelectRowAt: indexPath)
|
||||
let cell = tableView.cellForRow(at: indexPath)!
|
||||
|
|
@ -136,7 +136,7 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
showPasswordGeneratorFlavorActionSheet(sourceCell: cell)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func showPasswordGeneratorFlavorActionSheet(sourceCell: UITableViewCell) {
|
||||
let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
|
||||
var randomFlavorActionTitle = ""
|
||||
|
|
@ -152,12 +152,12 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
SharedDefaults[.passwordGeneratorFlavor] = "Random"
|
||||
sourceCell.detailTextLabel?.text = "Random"
|
||||
}
|
||||
|
||||
|
||||
let appleFlavorAction = UIAlertAction(title: appleFlavorActionTitle, style: .default) { _ in
|
||||
SharedDefaults[.passwordGeneratorFlavor] = "Apple"
|
||||
sourceCell.detailTextLabel?.text = "Apple"
|
||||
}
|
||||
|
||||
|
||||
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
|
||||
optionMenu.addAction(randomFlavorAction)
|
||||
optionMenu.addAction(appleFlavorAction)
|
||||
|
|
@ -166,37 +166,37 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
optionMenu.popoverPresentationController?.sourceRect = sourceCell.bounds
|
||||
self.present(optionMenu, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
|
||||
@objc func tapHideUnknownSwitchDetailButton(_ sender: Any?) {
|
||||
let alertMessage = "Only \"key: value\" format in additional fields is supported. Unsupported fields will be given \"unknown\" keys. Turn on this switch to hide unsupported fields."
|
||||
let alertTitle = "Hide Unknown Fields"
|
||||
Utils.alert(title: alertTitle, message: alertMessage, controller: self, completion: nil)
|
||||
}
|
||||
|
||||
|
||||
@objc func tapHideOTPSwitchDetailButton(_ sender: Any?) {
|
||||
let keywordsString = Constants.OTP_KEYWORDS.joined(separator: ",")
|
||||
let alertMessage = "Turn on this switch to hide the fields related to one time passwords (i.e., \(keywordsString))."
|
||||
let alertTitle = "Hide One Time Password Fields"
|
||||
Utils.alert(title: alertTitle, message: alertMessage, controller: self, completion: nil)
|
||||
}
|
||||
|
||||
|
||||
@objc func hideUnknownSwitchAction(_ sender: Any?) {
|
||||
SharedDefaults[.isHideUnknownOn] = hideUnknownSwitch.isOn
|
||||
NotificationCenter.default.post(name: .passwordDetailDisplaySettingChanged, object: nil)
|
||||
}
|
||||
|
||||
|
||||
@objc func hideOTPSwitchAction(_ sender: Any?) {
|
||||
SharedDefaults[.isHideOTPOn] = hideOTPSwitch.isOn
|
||||
NotificationCenter.default.post(name: .passwordDetailDisplaySettingChanged, object: nil)
|
||||
}
|
||||
|
||||
|
||||
@objc func rememberPGPPassphraseSwitchAction(_ sender: Any?) {
|
||||
SharedDefaults[.isRememberPGPPassphraseOn] = rememberPGPPassphraseSwitch.isOn
|
||||
if rememberPGPPassphraseSwitch.isOn == false {
|
||||
passwordStore.pgpKeyPassphrase = nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@objc func rememberGitCredentialPassphraseSwitchAction(_ sender: Any?) {
|
||||
SharedDefaults[.isRememberGitCredentialPassphraseOn] = rememberGitCredentialPassphraseSwitch.isOn
|
||||
if rememberGitCredentialPassphraseSwitch.isOn == false {
|
||||
|
|
@ -204,10 +204,10 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
passwordStore.gitPassword = nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@objc func showFolderSwitchAction(_ sender: Any?) {
|
||||
SharedDefaults[.isShowFolderOn] = showFolderSwitch.isOn
|
||||
NotificationCenter.default.post(name: .passwordDisplaySettingChanged, object: nil)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue