Name classes consistently

* Settings are called *SettingsTableViewController
* Key importers are called *ImportTableViewController
* Classes in UserInterface folder are split into Controllers or Views
This commit is contained in:
Danny Moesch 2020-02-12 23:28:04 +01:00 committed by Mingshen Sun
parent 20f18d0c8b
commit 3cdf77347a
14 changed files with 60 additions and 68 deletions

View file

@ -312,7 +312,7 @@
<!--Git Server-->
<scene sceneID="Obl-ql-ILG">
<objects>
<tableViewController id="ynQ-64-MfA" customClass="GitServerSettingTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="ynQ-64-MfA" customClass="GitRepositorySettingsTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="62X-tb-qYf">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -506,7 +506,7 @@
<!--PGP Key-->
<scene sceneID="8Hi-tl-elT">
<objects>
<tableViewController id="3WR-HY-zYj" customClass="PGPKeyUrlTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="3WR-HY-zYj" customClass="PGPKeyUrlImportTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="B51-hW-xc5">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -946,7 +946,7 @@ Secret Question 1: What is your childhood best friend's most bizarre superhero f
<!--SSH Key-->
<scene sceneID="7pC-mh-aE6">
<objects>
<tableViewController id="hqC-Ic-NMi" customClass="SSHKeySettingTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="hqC-Ic-NMi" customClass="SSHKeyUrlImportTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="WOg-sB-X94">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -1299,7 +1299,7 @@ Secret Question 1: What is your childhood best friend's most bizarre superhero f
<!--PGP Key-->
<scene sceneID="Jmv-A6-Wr1">
<objects>
<tableViewController id="1gA-jh-frD" customClass="PGPKeyArmorSettingTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="1gA-jh-frD" customClass="PGPKeyArmorImportTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="1" sectionFooterHeight="1" id="WYj-Sf-Cyc">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -1473,7 +1473,7 @@ Secret Question 1: What is your childhood best friend's most bizarre superhero f
<!--SSH Key-->
<scene sceneID="zWR-BT-dXv">
<objects>
<tableViewController id="WgM-cY-mig" customClass="GitSSHKeyArmorSettingTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="WgM-cY-mig" customClass="SSHKeyArmorImportTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="1" id="e2Q-qC-LUk">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -1567,7 +1567,7 @@ Secret Question 1: What is your childhood best friend's most bizarre superhero f
<!--Git Signature-->
<scene sceneID="eTh-B3-0rv">
<objects>
<tableViewController id="zDo-XK-ymp" customClass="GitConfigSettingTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="zDo-XK-ymp" customClass="GitConfigSettingsTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="9r8-pk-GBf">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -1760,7 +1760,7 @@ Secret Question 1: What is your childhood best friend's most bizarre superhero f
<!--PGP Key-->
<scene sceneID="KZQ-sz-cea">
<objects>
<tableViewController id="zh0-O0-5kJ" customClass="PGPKeyFileSettingTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="zh0-O0-5kJ" customClass="PGPKeyFileImportTableViewController" customModule="pass" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="1Zw-MV-6BD">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

View file

@ -82,7 +82,7 @@ class AdvancedSettingsTableViewController: UITableViewController {
}
@IBAction func saveGitConfigSetting(segue: UIStoryboardSegue) {
if let controller = segue.source as? GitConfigSettingTableViewController {
if let controller = segue.source as? GitConfigSettingsTableViewController {
if let gitSignatureName = controller.nameTextField.text,
let gitSignatureEmail = controller.emailTextField.text {
Defaults.gitSignatureName = gitSignatureName.isEmpty ? nil : gitSignatureName

View file

@ -1,5 +1,5 @@
//
// GitConfigSettingTableViewController.swift
// GitConfigSettingsTableViewController.swift
// pass
//
// Created by Yishi Lin on 10/4/17.
@ -9,7 +9,7 @@
import UIKit
import passKit
class GitConfigSettingTableViewController: UITableViewController {
class GitConfigSettingsTableViewController: UITableViewController {
let passwordStore = PasswordStore.shared
@IBOutlet weak var nameTextField: UITextField!

View file

@ -1,5 +1,5 @@
//
// GitServerSettingTableViewController.swift
// GitRepositorySettingsTableViewController.swift
// pass
//
// Created by Mingshen Sun on 21/1/2017.
@ -11,7 +11,7 @@ import SVProgressHUD
import passKit
class GitServerSettingTableViewController: UITableViewController {
class GitRepositorySettingsTableViewController: UITableViewController {
// MARK: - View Outlet
@IBOutlet weak var gitURLTextField: UITextField!

View file

@ -1,5 +1,5 @@
//
// PGPKeyArmorSettingTableViewController.swift
// PGPKeyArmorImportTableViewController.swift
// pass
//
// Created by Mingshen Sun on 17/2/2017.
@ -9,7 +9,7 @@
import UIKit
import passKit
class PGPKeyArmorSettingTableViewController: AutoCellHeightUITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
class PGPKeyArmorImportTableViewController: AutoCellHeightUITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
@IBOutlet weak var armorPublicKeyTextView: UITextView!
@IBOutlet weak var armorPrivateKeyTextView: UITextView!
@IBOutlet weak var scanPublicKeyCell: UITableViewCell!
@ -130,7 +130,7 @@ class PGPKeyArmorSettingTableViewController: AutoCellHeightUITableViewController
}
}
extension PGPKeyArmorSettingTableViewController: PGPKeyImporter {
extension PGPKeyArmorImportTableViewController: PGPKeyImporter {
static let keySource = PGPKeySource.armor
static let label = "AsciiArmorEncryptedKey".localize()

View file

@ -1,5 +1,5 @@
//
// PGPKeyFileSettingTableViewController.swift
// PGPKeyFileImportTableViewController.swift
// pass
//
// Created by Danny Moesch on 01.02.20.
@ -8,7 +8,7 @@
import passKit
class PGPKeyFileSettingTableViewController: AutoCellHeightUITableViewController {
class PGPKeyFileImportTableViewController: AutoCellHeightUITableViewController {
@IBOutlet weak var pgpPublicKeyFile: UITableViewCell!
@IBOutlet weak var pgpPrivateKeyFile: UITableViewCell!
@ -45,7 +45,7 @@ class PGPKeyFileSettingTableViewController: AutoCellHeightUITableViewController
}
}
extension PGPKeyFileSettingTableViewController: UIDocumentPickerDelegate {
extension PGPKeyFileImportTableViewController: UIDocumentPickerDelegate {
func documentPicker(_: UIDocumentPickerViewController, didPickDocumentsAt url: [URL]) {
guard let url = url.first else {
@ -70,7 +70,7 @@ extension PGPKeyFileSettingTableViewController: UIDocumentPickerDelegate {
}
}
extension PGPKeyFileSettingTableViewController: PGPKeyImporter {
extension PGPKeyFileImportTableViewController: PGPKeyImporter {
static let keySource = PGPKeySource.files
static let label = "LoadFromFiles".localize()

View file

@ -1,5 +1,5 @@
//
// PGPKeyUrlTableViewController.swift
// PGPKeyUrlImportTableViewController.swift
// pass
//
// Created by Mingshen Sun on 21/1/2017.
@ -9,7 +9,7 @@
import UIKit
import passKit
class PGPKeyUrlTableViewController: AutoCellHeightUITableViewController {
class PGPKeyUrlImportTableViewController: AutoCellHeightUITableViewController {
@IBOutlet weak var pgpPublicKeyURLTextField: UITextField!
@IBOutlet weak var pgpPrivateKeyURLTextField: UITextField!
@ -44,7 +44,7 @@ class PGPKeyUrlTableViewController: AutoCellHeightUITableViewController {
}
}
extension PGPKeyUrlTableViewController: PGPKeyImporter {
extension PGPKeyUrlImportTableViewController: PGPKeyImporter {
static let keySource = PGPKeySource.url
static let label = "DownloadFromUrl".localize()

View file

@ -1,5 +1,5 @@
//
// GitSSHKeyArmorSettingTableViewController.swift
// SSHKeyArmorImportTableViewController.swift
// pass
//
// Created by Mingshen Sun on 2/4/2017.
@ -9,7 +9,7 @@
import UIKit
import passKit
class GitSSHKeyArmorSettingTableViewController: AutoCellHeightUITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
class SSHKeyArmorImportTableViewController: AutoCellHeightUITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
@IBOutlet weak var armorPrivateKeyTextView: UITextView!
@IBOutlet weak var scanPrivateKeyCell: UITableViewCell!

View file

@ -1,5 +1,5 @@
//
// SSHKeySettingTableViewController.swift
// SSHKeyUrlImportTableViewController.swift
// pass
//
// Created by Mingshen Sun on 25/1/2017.
@ -10,7 +10,7 @@ import UIKit
import SVProgressHUD
import passKit
class SSHKeySettingTableViewController: AutoCellHeightUITableViewController {
class SSHKeyUrlImportTableViewController: AutoCellHeightUITableViewController {
@IBOutlet weak var privateKeyURLTextField: UITextField!

View file

@ -130,13 +130,13 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
func showPGPKeyActionSheet() {
let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
optionMenu.addAction(UIAlertAction(title: PGPKeyUrlTableViewController.menuLabel, style: .default) { _ in
optionMenu.addAction(UIAlertAction(title: PGPKeyUrlImportTableViewController.menuLabel, style: .default) { _ in
self.performSegue(withIdentifier: "setPGPKeyByURLSegue", sender: self)
})
optionMenu.addAction(UIAlertAction(title: PGPKeyArmorSettingTableViewController.menuLabel, style: .default) { _ in
optionMenu.addAction(UIAlertAction(title: PGPKeyArmorImportTableViewController.menuLabel, style: .default) { _ in
self.performSegue(withIdentifier: "setPGPKeyByASCIISegue", sender: self)
})
optionMenu.addAction(UIAlertAction(title: PGPKeyFileSettingTableViewController.menuLabel, style: .default) { _ in
optionMenu.addAction(UIAlertAction(title: PGPKeyFileImportTableViewController.menuLabel, style: .default) { _ in
self.performSegue(withIdentifier: "setPGPKeyByFileSegue", sender: self)
})