Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
332ed77
issue #530 ask only for mail permission on sign up
sosnovsky Nov 16, 2021
6dd56f7
Merge branch 'master' into feature/issue-530-google-grant
sosnovsky Nov 16, 2021
bec5f0c
issue #530 ask for contacts scope on compose screen
sosnovsky Nov 17, 2021
5018665
issue #530 add google contacts button to the contacts search results
sosnovsky Nov 18, 2021
83d4758
issue #530 handle contacts scope
sosnovsky Nov 18, 2021
d0b4a19
Merge branch 'master' into feature/issue-530-google-grant
sosnovsky Nov 18, 2021
87c5221
issue #530 fix recipient evaluation
sosnovsky Nov 19, 2021
d6aaa67
issue #530 fix granted scopes fetch
sosnovsky Nov 19, 2021
5863428
Merge branch 'master' into feature/issue-530-google-grant
sosnovsky Nov 20, 2021
1624ccc
issue #530 remove contacts permission alert and unused localizations
sosnovsky Nov 20, 2021
d6fd918
issue #530 handle contacts permission errors
sosnovsky Nov 22, 2021
4e2fabb
Merge branch 'master' into feature/issue-530-google-grant
sosnovsky Nov 22, 2021
ccceac1
issue #530 missing scopes evaluation update
sosnovsky Nov 22, 2021
656871d
Merge branch 'master' into feature/issue-530-google-grant
sosnovsky Nov 22, 2021
35c571b
issue #530 fix scopes adding for multiple accounts
sosnovsky Nov 22, 2021
1110c35
Merge branch 'master' into feature/issue-530-google-grant
sosnovsky Nov 22, 2021
5f98520
increase test timeouts
tomholub Nov 23, 2021
c6908cb
disabled failing test + update readme + improved appium google login
tomholub Nov 23, 2021
9a55ea8
fix appium tests
tomholub Nov 23, 2021
4ac67a7
delays
tomholub Nov 23, 2021
94a3f91
Merge branch 'master' into feature/issue-530-google-grant
tomholub Nov 23, 2021
68a4c42
rm unneeded fix
tomholub Nov 23, 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
6 changes: 3 additions & 3 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ agent:
type: a1-standard-4
os_image: macos-xcode13
execution_time_limit:
minutes: 60
minutes: 90
auto_cancel:
running:
when: branch != 'master'
Expand All @@ -15,7 +15,7 @@ blocks:
run: # don't run if the only thing that changed is Core deps
when: "change_in('/', {exclude: ['/Core/package.json', '/Core/package-lock.json']})"
execution_time_limit:
minutes: 55
minutes: 85
task:
secrets:
- name: flowcrypt-ios-ci-secrets
Expand Down Expand Up @@ -53,7 +53,7 @@ blocks:
run: # don't run if the only thing that changed is Appium test deps
when: "change_in('/', {exclude: ['/appium/package.json', '/appium/package-lock.json']})"
execution_time_limit:
minutes: 55
minutes: 45
task:
env_vars:
- name: LANG
Expand Down
21 changes: 12 additions & 9 deletions FlowCrypt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
51E1675D270F36A400D27C52 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 51E1675C270F36A400D27C52 /* Realm */; };
51E1675F270F36A400D27C52 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 51E1675E270F36A400D27C52 /* RealmSwift */; };
51E4F0B527348E310017DABB /* Error+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E4F0B427348E310017DABB /* Error+Extension.swift */; };
51EBC5702746A06600178DE8 /* TextWithIconNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EBC56F2746A06600178DE8 /* TextWithIconNode.swift */; };
5298EA408FEC36021F7558BD /* Pods_FlowCrypt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4753E9A27694B4D34C980FFA /* Pods_FlowCrypt.framework */; };
5A39F42D239EC321001F4607 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A39F42C239EC321001F4607 /* SettingsViewController.swift */; };
5A39F430239EC396001F4607 /* SettingsViewDecorator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A39F42F239EC396001F4607 /* SettingsViewDecorator.swift */; };
Expand All @@ -102,7 +103,7 @@
5ADEDCBC23A4329000EC495E /* PublicKeyDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADEDCBB23A4329000EC495E /* PublicKeyDetailViewController.swift */; };
5ADEDCBE23A4363700EC495E /* KeyDetailInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADEDCBD23A4363700EC495E /* KeyDetailInfoViewController.swift */; };
5ADEDCC023A43B0800EC495E /* KeyDetailInfoViewDecorator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADEDCBF23A43B0800EC495E /* KeyDetailInfoViewDecorator.swift */; };
601EEE31272B19D200FE445B /* CheckAuthScopesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 601EEE30272B19D200FE445B /* CheckAuthScopesViewController.swift */; };
601EEE31272B19D200FE445B /* CheckMailAuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 601EEE30272B19D200FE445B /* CheckMailAuthViewController.swift */; };
7F72537A0C44D3CE670F0EFD /* Pods_FlowCryptUIApplication.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3382C015A576728FA08BA310 /* Pods_FlowCryptUIApplication.framework */; };
949ED9422303E3B400530579 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 949ED9412303E3B400530579 /* Colors.xcassets */; };
9F003D6125E1B4ED00EB38C0 /* TrashFolderProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F003D6025E1B4ED00EB38C0 /* TrashFolderProvider.swift */; };
Expand Down Expand Up @@ -503,6 +504,7 @@
51DE2FED2714DA0400916222 /* ContactKeyCellNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactKeyCellNode.swift; sourceTree = "<group>"; };
51E1673C270DAFF900D27C52 /* Localizable.stringsdict */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; path = Localizable.stringsdict; sourceTree = "<group>"; };
51E4F0B427348E310017DABB /* Error+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Error+Extension.swift"; sourceTree = "<group>"; };
51EBC56F2746A06600178DE8 /* TextWithIconNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextWithIconNode.swift; sourceTree = "<group>"; };
55652F68438D6EDFE71EA13C /* Pods-FlowCryptUIApplication.enterprise.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FlowCryptUIApplication.enterprise.xcconfig"; path = "Target Support Files/Pods-FlowCryptUIApplication/Pods-FlowCryptUIApplication.enterprise.xcconfig"; sourceTree = "<group>"; };
5A39F42C239EC321001F4607 /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
5A39F42F239EC396001F4607 /* SettingsViewDecorator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewDecorator.swift; sourceTree = "<group>"; };
Expand All @@ -521,7 +523,7 @@
5ADEDCBD23A4363700EC495E /* KeyDetailInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyDetailInfoViewController.swift; sourceTree = "<group>"; };
5ADEDCBF23A43B0800EC495E /* KeyDetailInfoViewDecorator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyDetailInfoViewDecorator.swift; sourceTree = "<group>"; };
5ADEDCC123A43C6800EC495E /* KeyTextCellNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyTextCellNode.swift; sourceTree = "<group>"; };
601EEE30272B19D200FE445B /* CheckAuthScopesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckAuthScopesViewController.swift; sourceTree = "<group>"; };
601EEE30272B19D200FE445B /* CheckMailAuthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckMailAuthViewController.swift; sourceTree = "<group>"; };
949ED9412303E3B400530579 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = "<group>"; };
9F003D6025E1B4ED00EB38C0 /* TrashFolderProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrashFolderProvider.swift; sourceTree = "<group>"; };
9F003D6C25EA8F3200EB38C0 /* UserAccountService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAccountService.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1106,12 +1108,12 @@
path = "Key Details";
sourceTree = "<group>";
};
601EEE32272B1A5800FE445B /* CheckAuthScopes */ = {
601EEE32272B1A5800FE445B /* CheckMailAuth */ = {
isa = PBXGroup;
children = (
601EEE30272B19D200FE445B /* CheckAuthScopesViewController.swift */,
601EEE30272B19D200FE445B /* CheckMailAuthViewController.swift */,
);
path = CheckAuthScopes;
path = CheckMailAuth;
sourceTree = "<group>";
};
9F0C3C1F23191F2000299985 /* Services */ = {
Expand Down Expand Up @@ -1695,7 +1697,7 @@
C132B9C51EC2DCAB00763715 /* Controllers */ = {
isa = PBXGroup;
children = (
601EEE32272B1A5800FE445B /* CheckAuthScopes */,
601EEE32272B1A5800FE445B /* CheckMailAuth */,
04B472911ECE29F600B8266F /* SideMenu */,
D2FF6969243115FE007182F0 /* SetupImap */,
32DCA8D5AF0A43354CC7F58B /* SignIn */,
Expand Down Expand Up @@ -2012,6 +2014,7 @@
isa = PBXGroup;
children = (
9F7ECCA6272C3FB4008A1770 /* TextImageNode.swift */,
51EBC56F2746A06600178DE8 /* TextWithIconNode.swift */,
9FA1988F253C841F008C9CF2 /* TableViewController.swift */,
9F696292236091DD003712E1 /* SignInImageNode.swift */,
9F696294236091F4003712E1 /* SignInDescriptionNode.swift */,
Expand Down Expand Up @@ -2220,7 +2223,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1310;
ORGANIZATIONNAME = "FlowCrypt Limited";
TargetAttributes = {
9F2AC5C5267BE99E00F6149B = {
Expand Down Expand Up @@ -2574,7 +2577,6 @@
21489B80267CC39E00BDE4AC /* ClientConfigurationService.swift in Sources */,
D28655932423B4EE0066F52E /* MyMenuViewDecorator.swift in Sources */,
04B4728D1ECE29D200B8266F /* KeyInfoRealmObject.swift in Sources */,
04B4728D1ECE29D200B8266F /* KeyInfoRealmObject.swift in Sources */,
9F3EF32F23B172D300FA0CEF /* SearchViewController.swift in Sources */,
F191F621272511790053833E /* BlurViewController.swift in Sources */,
D2F6D147243506DA00DB4065 /* MailSettingsCredentials.swift in Sources */,
Expand Down Expand Up @@ -2713,7 +2715,7 @@
21489B7A267CB4DF00BDE4AC /* ClientConfigurationRealmObject.swift in Sources */,
5180CB9327357B67001FC7EF /* RawClientConfiguration.swift in Sources */,
5A5C234B23A042520015E705 /* WebViewController.swift in Sources */,
601EEE31272B19D200FE445B /* CheckAuthScopesViewController.swift in Sources */,
601EEE31272B19D200FE445B /* CheckMailAuthViewController.swift in Sources */,
9F5C2A7E257E64D500DE9B4B /* MessageOperationsProvider.swift in Sources */,
9FC7EB76266EB67B00F3BF5D /* EncryptedStorageProtocols.swift in Sources */,
32DCACF9C6FC4B9330C9B362 /* Imap+send.swift in Sources */,
Expand Down Expand Up @@ -2758,6 +2760,7 @@
51DE2FEE2714DA0400916222 /* ContactKeyCellNode.swift in Sources */,
D2A9CA432426210200E1D898 /* SetupTitleNode.swift in Sources */,
D2F6D12F24324ACC00DB4065 /* SwitchCellNode.swift in Sources */,
51EBC5702746A06600178DE8 /* TextWithIconNode.swift in Sources */,
5180CB97273724E9001FC7EF /* ThreadMessageSenderCellNode.swift in Sources */,
D2E26F6824F169E300612AF1 /* ContactCellNode.swift in Sources */,
D2A9CA38242618DF00E1D898 /* LinkButtonNode.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1310"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1310"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
8 changes: 4 additions & 4 deletions FlowCrypt.xcworkspace/xcshareddata/swiftpm/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// CheckAuthScopesViewController.swift
// CheckMailAuthViewController.swift
// FlowCrypt
//
// Created by Yevhen Kyivskyi on 28.10.2021
Expand All @@ -9,28 +9,12 @@
import AsyncDisplayKit
import FlowCryptCommon
import FlowCryptUI
import UIKit

private extension GoogleScope {
var title: String {
switch self {
case .userInfo: return "User Info"
case .mail: return "Gmail"
case .contacts: return "Contacts"
case .otherContacts: return "Other Contacts"
}
}
}

class CheckAuthScopesViewController: TableNodeViewController {

private let missingScopes: [GoogleScope]
class CheckMailAuthViewController: TableNodeViewController {
private let globalRouter: GlobalRouterType

init(
missingScopes: [GoogleScope],
globalRouter: GlobalRouterType = GlobalRouter()
) {
self.missingScopes = missingScopes
init(globalRouter: GlobalRouterType = GlobalRouter()) {
self.globalRouter = globalRouter
super.init(node: TableNode())
}
Expand All @@ -44,15 +28,10 @@ class CheckAuthScopesViewController: TableNodeViewController {
super.viewDidLoad()
setupUI()
}

var errorMessage: String {
let scopesMessage = missingScopes.map { $0.title }.joined(separator: ", ")
return "gmail_service_no_access_to_account_message".localizeWithArguments(scopesMessage)
}
}

// MARK: - ASTableDelegate, ASTableDataSource
extension CheckAuthScopesViewController: ASTableDelegate, ASTableDataSource {
extension CheckMailAuthViewController: ASTableDelegate, ASTableDataSource {
func tableNode(_: ASTableNode, numberOfRowsInSection _: Int) -> Int {
return 3
}
Expand All @@ -66,7 +45,7 @@ extension CheckAuthScopesViewController: ASTableDelegate, ASTableDataSource {
}

// MARK: - UI
extension CheckAuthScopesViewController {
extension CheckMailAuthViewController {
private func setupUI() {
node.delegate = self
node.dataSource = self
Expand Down Expand Up @@ -96,10 +75,11 @@ extension CheckAuthScopesViewController {
return TextCellNode(
input: .init(
backgroundColor: .backgroundColor,
title: errorMessage,
title: "gmail_service_no_access_to_account_message".localized,
withSpinner: false,
size: CGSize(width: 200, height: 200),
alignment: .center
insets: UIEdgeInsets.side(24),
textAlignment: .center
)
)
case 2:
Expand Down
Loading