Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a960331
Added comments to setup flow controllers
Kharchevskyi Jun 22, 2021
224ed7e
Update SetupBackupsViewController.swift
tomholub Jun 22, 2021
5e86c1e
Update SetupGenerateKeyViewController.swift
tomholub Jun 22, 2021
7fc7fa4
Update SetupInitialViewController.swift
tomholub Jun 22, 2021
db33b40
Update SetupManuallyEnterPassPhraseViewController.swift
tomholub Jun 22, 2021
b8bb32b
Update SetupManuallyImportKeyViewController.swift
tomholub Jun 22, 2021
427a826
Merge branch 'master' into feature/issue-460-add-comments
tomholub Jun 22, 2021
d08dc83
Merge branch 'master' into feature/issue-460-add-comments
tomholub Jun 24, 2021
3f73d47
Update MyMenuViewController
Kharchevskyi Jun 24, 2021
2c58890
Update SideMenuNavigationController
Kharchevskyi Jun 24, 2021
a4c258d
Update MainNavigationController
Kharchevskyi Jun 24, 2021
99fcb12
Update EmailProviderViewController
Kharchevskyi Jun 24, 2021
44272e4
Update SignInViewController
Kharchevskyi Jun 24, 2021
5a23c5e
Update WebViewController
Kharchevskyi Jun 24, 2021
719972e
Update BootstrapViewController
Kharchevskyi Jun 24, 2021
dc47538
Update InboxViewController
Kharchevskyi Jun 24, 2021
b9478ae
Update InboxViewControllerContainer
Kharchevskyi Jun 24, 2021
40ace0c
Update ComposeViewController
Kharchevskyi Jun 24, 2021
18fa470
Update MessageViewController
Kharchevskyi Jun 24, 2021
6fd4784
Update SearchViewController
Kharchevskyi Jun 24, 2021
7625008
Update ContactsListViewController
Kharchevskyi Jun 24, 2021
c1426c0
Update ContactDetailViewController
Kharchevskyi Jun 24, 2021
6b42a9a
Update KeySettingsViewController
Kharchevskyi Jun 24, 2021
a69ea04
Update KeyDetailViewController
Kharchevskyi Jun 24, 2021
9b29660
Update PublicKeyDetailViewController
Kharchevskyi Jun 24, 2021
2d8e242
Update KeyDetailInfoViewController
Kharchevskyi Jun 24, 2021
fdac977
Update LegalViewController
Kharchevskyi Jun 24, 2021
ee1f7b9
Minor updates
Kharchevskyi Jun 24, 2021
6f97994
Merge branch 'master' into feature/issue-460-add-comments
tomholub Jun 24, 2021
2368361
Update WebViewController.swift
tomholub Jun 24, 2021
73f3688
Update InboxViewController.swift
tomholub Jun 24, 2021
90bae0a
Update MessageViewController.swift
tomholub Jun 24, 2021
1d9cfb5
Update ContactDetailViewController.swift
tomholub Jun 24, 2021
f8d492d
Update ContactsListViewController.swift
tomholub Jun 24, 2021
ca5d554
Update ContactsListViewController.swift
tomholub Jun 24, 2021
02eb86d
Update KeyDetailInfoViewController.swift
tomholub Jun 24, 2021
2b91235
Update EmailProviderViewController.swift
tomholub Jun 24, 2021
dabace1
Rename InboxViewControllerContainer
Kharchevskyi Jun 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions FlowCrypt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
04B472951ECE29F600B8266F /* MyMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B472921ECE29F600B8266F /* MyMenuViewController.swift */; };
04B472961ECE29F600B8266F /* SideMenuNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B472931ECE29F600B8266F /* SideMenuNavigationController.swift */; };
211392A5266511E6009202EC /* PubLookup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 211392A4266511E6009202EC /* PubLookup.swift */; };
21489B6B267B7BD800BDE4AC /* FilesManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B6A267B7BD800BDE4AC /* FilesManagerTests.swift */; };
21489B6C267B7C6A00BDE4AC /* FilesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215897E7267A553200423694 /* FilesManager.swift */; };
21489B6E267B7D5000BDE4AC /* FileMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B6D267B7D5000BDE4AC /* FileMock.swift */; };
215897E8267A553300423694 /* FilesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215897E7267A553200423694 /* FilesManager.swift */; };
2196A2202684B9BE001B9E00 /* URLExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2196A21F2684B9BE001B9E00 /* URLExtension.swift */; };
21489B78267CB42400BDE4AC /* ClientConfigurationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B77267CB42400BDE4AC /* ClientConfigurationProvider.swift */; };
21489B7A267CB4DF00BDE4AC /* ClientConfigurationObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B79267CB4DF00BDE4AC /* ClientConfigurationObject.swift */; };
21489B7C267CBA0E00BDE4AC /* ClientConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B7B267CBA0E00BDE4AC /* ClientConfiguration.swift */; };
21489B80267CC39E00BDE4AC /* OrganisationalRulesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B7F267CC39E00BDE4AC /* OrganisationalRulesService.swift */; };
21489B83267CC99C00BDE4AC /* OrganisationalRulesServiceError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B82267CC99C00BDE4AC /* OrganisationalRulesServiceError.swift */; };
215897E8267A553300423694 /* FilesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215897E7267A553200423694 /* FilesManager.swift */; };
2196A2202684B9BE001B9E00 /* URLExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2196A21F2684B9BE001B9E00 /* URLExtension.swift */; };
21C7DEFC26669A3700C44800 /* CalendarExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C7DEFB26669A3700C44800 /* CalendarExtension.swift */; };
21C7DEFE26669CE100C44800 /* DateFormattingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F56BD3723438C7000A7371A /* DateFormattingExtensions.swift */; };
21C7DF0526697DA500C44800 /* PromiseKitExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C7DF0426697DA500C44800 /* PromiseKitExtension.swift */; };
Expand Down Expand Up @@ -109,7 +106,7 @@
9F7E5137267AA51B00CE37C3 /* AlertsFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F7E5136267AA51B00CE37C3 /* AlertsFactory.swift */; };
9F8220D526336626004B2009 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8220D426336626004B2009 /* Logger.swift */; };
9F82779823737E0900E19C07 /* MessageViewDecorator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F82779723737E0900E19C07 /* MessageViewDecorator.swift */; };
9F82D352256D74FA0069A702 /* InboxViewControllerContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F82D351256D74FA0069A702 /* InboxViewControllerContainer.swift */; };
9F82D352256D74FA0069A702 /* InboxViewContainerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F82D351256D74FA0069A702 /* InboxViewContainerController.swift */; };
9F92EE72236F165E009BE0D7 /* EncryptedStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F92EE71236F165E009BE0D7 /* EncryptedStorage.swift */; };
9F9361A52573CE260009912F /* MessageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F9361A42573CE260009912F /* MessageProvider.swift */; };
9F9362062573D0C80009912F /* Gmail+MessagesList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F9362052573D0C80009912F /* Gmail+MessagesList.swift */; };
Expand Down Expand Up @@ -366,13 +363,13 @@
211392A4266511E6009202EC /* PubLookup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PubLookup.swift; sourceTree = "<group>"; };
21489B6A267B7BD800BDE4AC /* FilesManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesManagerTests.swift; sourceTree = "<group>"; };
21489B6D267B7D5000BDE4AC /* FileMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileMock.swift; sourceTree = "<group>"; };
215897E7267A553200423694 /* FilesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesManager.swift; sourceTree = "<group>"; };
2196A21F2684B9BE001B9E00 /* URLExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLExtension.swift; sourceTree = "<group>"; };
21489B77267CB42400BDE4AC /* ClientConfigurationProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientConfigurationProvider.swift; sourceTree = "<group>"; };
21489B79267CB4DF00BDE4AC /* ClientConfigurationObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientConfigurationObject.swift; sourceTree = "<group>"; };
21489B7B267CBA0E00BDE4AC /* ClientConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientConfiguration.swift; sourceTree = "<group>"; };
21489B7F267CC39E00BDE4AC /* OrganisationalRulesService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrganisationalRulesService.swift; sourceTree = "<group>"; };
21489B82267CC99C00BDE4AC /* OrganisationalRulesServiceError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrganisationalRulesServiceError.swift; sourceTree = "<group>"; };
215897E7267A553200423694 /* FilesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesManager.swift; sourceTree = "<group>"; };
2196A21F2684B9BE001B9E00 /* URLExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLExtension.swift; sourceTree = "<group>"; };
21C7DEFB26669A3700C44800 /* CalendarExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarExtension.swift; sourceTree = "<group>"; };
21C7DF0426697DA500C44800 /* PromiseKitExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseKitExtension.swift; sourceTree = "<group>"; };
21C7DF08266C0D8F00C44800 /* EnterpriseServerApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterpriseServerApi.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -513,7 +510,7 @@
9F82779923737E1900E19C07 /* MessageSenderNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageSenderNode.swift; sourceTree = "<group>"; };
9F82779B23737E2A00E19C07 /* MessageSubjectNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageSubjectNode.swift; sourceTree = "<group>"; };
9F82779D23737E3800E19C07 /* MessageTextSubjectNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTextSubjectNode.swift; sourceTree = "<group>"; };
9F82D351256D74FA0069A702 /* InboxViewControllerContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxViewControllerContainer.swift; sourceTree = "<group>"; };
9F82D351256D74FA0069A702 /* InboxViewContainerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxViewContainerController.swift; sourceTree = "<group>"; };
9F8D5E61236B04E300186E43 /* CellNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CellNode.swift; sourceTree = "<group>"; };
9F92EE6F236F144C009BE0D7 /* TextFieldCellNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldCellNode.swift; sourceTree = "<group>"; };
9F92EE71236F165E009BE0D7 /* EncryptedStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedStorage.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -783,14 +780,6 @@
path = FilesManager;
sourceTree = "<group>";
};
215897E6267A551300423694 /* FilesManager */ = {
isa = PBXGroup;
children = (
215897E7267A553200423694 /* FilesManager.swift */,
);
path = FilesManager;
sourceTree = "<group>";
};
21489B81267CC3BC00BDE4AC /* Organisational Rules Service */ = {
isa = PBXGroup;
children = (
Expand All @@ -801,6 +790,14 @@
path = "Organisational Rules Service";
sourceTree = "<group>";
};
215897E6267A551300423694 /* FilesManager */ = {
isa = PBXGroup;
children = (
215897E7267A553200423694 /* FilesManager.swift */,
);
path = FilesManager;
sourceTree = "<group>";
};
21CE25D32650034500ADFF4B /* WKDURLs */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -931,9 +928,9 @@
5A39F43B239ECFA0001F4607 /* KeySettings */ = {
isa = PBXGroup;
children = (
5ADEDCB423A4262600EC495E /* Key List */,
D29A0002240C140500C1387D /* Key Detail Info */,
D29A0003240C141200C1387D /* Public Key */,
5ADEDCB423A4262600EC495E /* Key List */,
5ADEDCB723A426E900EC495E /* Key Details */,
);
path = KeySettings;
Expand Down Expand Up @@ -1147,7 +1144,7 @@
9F4300A52571016400791CFB /* Container */ = {
isa = PBXGroup;
children = (
9F82D351256D74FA0069A702 /* InboxViewControllerContainer.swift */,
9F82D351256D74FA0069A702 /* InboxViewContainerController.swift */,
9F4300CB2571045B00791CFB /* InboxViewControllerContainerDecorator.swift */,
);
path = Container;
Expand Down Expand Up @@ -2525,7 +2522,7 @@
9FC7EAB3266A404D00F3BF5D /* PassPhraseObject.swift in Sources */,
9F31AB8C23298B3F00CF87EA /* Imap+retry.swift in Sources */,
9F79229426696B9300DA3D80 /* KeyDataStorage.swift in Sources */,
9F82D352256D74FA0069A702 /* InboxViewControllerContainer.swift in Sources */,
9F82D352256D74FA0069A702 /* InboxViewContainerController.swift in Sources */,
D227C0E3250538100070F805 /* LocalFoldersProvider.swift in Sources */,
9FA405C7265AEBA50084D133 /* SetupGenerateKeyViewController.swift in Sources */,
9F6EE1552597399D0059BA51 /* BackupProvider.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import UIKit
import WebKit

/**
* InApp WebViewController to show web content. Used for showing privacy policy etc in splash screen and settings
*/
final class WebViewController: UIViewController {
private lazy var webView = WKWebView()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

import UIKit

/**
* View controller with activity indicator which is presented before all AppStartup activity finished (setup Core, migration of the DB...)
*/
final class BootstrapViewController: UIViewController {
let imap = Imap.shared
var completion: ((Error?) -> Void)?

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .backgroundColor
let activityIndicator = UIActivityIndicatorView(style: .gray)
let activityIndicator = UIActivityIndicatorView(style: .medium)
activityIndicator.startAnimating()
view.addSubview(activityIndicator)
activityIndicator.center = view.center
Expand Down
5 changes: 5 additions & 0 deletions FlowCrypt/Controllers/Compose/ComposeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import FlowCryptCommon
import FlowCryptUI
import Promises

/**
* View controller to compose the message and send it
* - User can be redirected here from *InboxViewController* by tapping on *+*
* - Or from *MessageViewController* controller by tapping on *reply*
*/
final class ComposeViewController: TableNodeViewController {
struct Recipient {
let email: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import AsyncDisplayKit
import FlowCryptCommon
import FlowCryptUI

// MARK: - InboxViewControllerContainer
// Used to fetch folders and get correct path for "inbox" folder
final class InboxViewControllerContainer: TableNodeViewController {
/**
* View controller which serves as intermediate controller
* - Used to fetch folders and get correct path for "inbox" folder
*/
final class InboxViewContainerController: TableNodeViewController {
private let inbox = "inbox"

private enum InboxViewControllerContainerError: Error {
Expand Down Expand Up @@ -102,7 +104,7 @@ final class InboxViewControllerContainer: TableNodeViewController {
}
}

extension InboxViewControllerContainer: ASTableDelegate, ASTableDataSource {
extension InboxViewContainerController: ASTableDelegate, ASTableDataSource {
func tableNode(_ tableNode: ASTableNode, numberOfRowsInSection section: Int) -> Int {
switch state {
case .empty, .loading:
Expand Down
5 changes: 5 additions & 0 deletions FlowCrypt/Controllers/Inbox/InboxViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import FlowCryptCommon
import FlowCryptUI
import Promises

/**
* View controller which shows message list of selected folder or inbox
* - Initial view controller of the *main flow* when user is already signed in
* - User can be redirected here via selecting folder from menu *MyMenuViewController*
*/
final class InboxViewController: ASDKViewController<ASDisplayNode> {
private enum Constants {
static let numberOfMessagesToLoad = 50
Expand Down
4 changes: 4 additions & 0 deletions FlowCrypt/Controllers/Msg/MessageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import FlowCryptCommon
import FlowCryptUI
import Promises

/**
* View controller to render an email message (sender, subject, message body, attachments)
* Also contains buttons to archive, move to trash, move to inbox, mark as unread, and reply
*/
final class MessageViewController: TableNodeViewController {
struct Input {
var objMessage: Message
Expand Down
4 changes: 4 additions & 0 deletions FlowCrypt/Controllers/Search/SearchViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import AsyncDisplayKit
import FlowCryptCommon
import FlowCryptUI

/**
* View controller to search messages in folders
* - User can be redirected here from *InboxViewController* by tapping on search icon
*/
final class SearchViewController: TableNodeViewController {
private enum Constants {
// TODO: - Ticket - Add pagination for SearchViewController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import AsyncDisplayKit
import FlowCryptUI

/**
* View controller which shows details about a contact and the public key recorded for it
* - User can be redirected here from settings *ContactsListViewController* by tapping on a particular contact
*/
final class ContactDetailViewController: TableNodeViewController {
typealias ContactDetailAction = (Action) -> Void

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import AsyncDisplayKit
import FlowCryptCommon
import FlowCryptUI

/**
* View controller which shows saved user contacts list
* - User can be redirected here from settings *SettingsViewController*
* - By tapping on a particular contact, user will be forwarded to *ContactDetailViewController*
*/
final class ContactsListViewController: TableNodeViewController {
private let decorator: ContactsListDecoratorType
private let contactsProvider: LocalContactsProviderType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

import UIKit

/**
* View controller which shows legal information (privacy, license, sources, terms)
* - User can be redirected here from settings *SettingsViewController*
*/
final class LegalViewController: UIViewController {
private let provider: LegalViewControllersProviderType
private lazy var segment: SegmentedViewController = SegmentedViewController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import AsyncDisplayKit
import FlowCryptUI

/**
* View controller which shows information about our own private and public key details (key words, fingerprint ...)
* - User can be redirected here from *KeyDetailViewController*
*/
final class KeyDetailInfoViewController: TableNodeViewController {
enum Parts: Int, CaseIterable {
case keyWord, fingerptint, longId, date, users, separator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import AsyncDisplayKit
import FlowCryptUI

/**
* View controller which shows possible option for the keys, like show it's public part, details, copy or share it.
* - User can be redirected here from *KeyDetailViewController*
*/
final class KeyDetailViewController: TableNodeViewController {
enum Parts: Int, CaseIterable {
case description, publicInfo, keyDetails, copy, save, privateInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
import AsyncDisplayKit
import FlowCryptUI

/**
* View controller shows list of user keys
* - User can be redirected here from settings *SettingsViewController*
* - User can proceed to importing keys *SetupManuallyImportKeyViewController*
* - User can see detail information for the key in *KeyDetailViewController*
*/
final class KeySettingsViewController: TableNodeViewController {
private var keys: [KeyDetails] = []
private let decorator: KeySettingsViewDecoratorType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import AsyncDisplayKit
import FlowCryptUI

/**
* View controller which shows information about public key
* - User can be redirected here from *KeyDetailViewController*
*/
final class PublicKeyDetailViewController: TableNodeViewController {
private let text: String

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
import AsyncDisplayKit
import FlowCryptUI

/**
* User settings view controller
* - Shows list of possible settings(backups, privacy, contacts, keys, atteseter, notifications, legal, experimental)
* - User can be redirected here from side menu
* - Tap on each row will navigate user to appropriate settings controller
*/
final class SettingsViewController: TableNodeViewController {
private enum Settings: Int, CaseIterable {
case backups, privacy, contacts, keys, atteseter, notifications, legal, experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ import AsyncDisplayKit
import FlowCryptUI
import Promises

/**
* Scene which is responsible for recovering user account with backups from inbox and entered pass phrase
* (typically used for end-users, enterprises tend to either import manually or with EKM)
* - User is sent here from **SetupInitialViewController** if there was key backups found in inbox
* - User will be prompted to enter his pass phrase
* - Pass phrase can be saved in memory for 4 hours or in encrypted local storage
* - In case entered pass phrase matches with backups, user will be redirected to **main flow** (inbox view)
*/

final class SetupBackupsViewController: TableNodeViewController, PassPhraseSaveable {
private enum Parts: Int, CaseIterable {
case title, description, passPhrase, divider, saveLocally, saveInMemory, action, optionalAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ enum CreateKeyError: Error {
case conformingPassPhraseError
}

/**
* Controller which is responsible for generating a new key during setup
* - User is sent here from **SetupInitialViewController** in case there are no backups found
* - Here user can enter a pass phrase (can be saved in memory or in encrypted storage) and generate a key
* - After key is generated, user will be redirected to **main flow** (inbox view)
*/

final class SetupGenerateKeyViewController: TableNodeViewController, PassPhraseSaveable {
enum Parts: Int, CaseIterable {
case title, description, passPhrase, divider, saveLocally, saveInMemory, action, subtitle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
import AsyncDisplayKit
import FlowCryptUI

/**
* Initial controller for setup flow which is responsible for searching backups and
* then redirecting user to appropriate setup flow.
* - In case backup keys are found, user will be redirected to **SetupBackupsViewController**
* - In case there are no backups, user will have two options presented in this view:
* - Import key - **SetupManuallyImportKeyViewController**
* - Create new key - **SetupGenerateKeyViewController**
*/
final class SetupInitialViewController: TableNodeViewController {
private enum Parts: Int, CaseIterable {
case title, description, createKey, importKey, anotherAccount
Expand Down
Loading