Marino Faggiana 7 жил өмнө
parent
commit
e054785eaa

+ 1 - 1
Picker/DocumentPickerViewController.swift

@@ -531,7 +531,7 @@ extension DocumentPickerViewController {
         viewController.touchIDManager = touchIDManager
         viewController.touchIDManager = touchIDManager
         viewController.title = title
         viewController.title = title
         viewController.navigationItem.leftBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(passcodeViewCloseButtonPressed(sender:)))
         viewController.navigationItem.leftBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(passcodeViewCloseButtonPressed(sender:)))
-        //viewController.navigationItem.leftBarButtonItem?.tintColor = NCBrandColor.sharedInstance.cryptocloud
+        viewController.navigationItem.leftBarButtonItem?.tintColor = NCBrandColor.sharedInstance.encrypted
         
         
         let navController = UINavigationController.init(rootViewController: viewController)
         let navController = UINavigationController.init(rootViewController: viewController)
         self.present(navController, animated: true, completion: nil)
         self.present(navController, animated: true, completion: nil)

+ 1 - 1
Share/ShareViewController.m

@@ -319,7 +319,7 @@
     viewController.touchIDManager = touchIDManager;
     viewController.touchIDManager = touchIDManager;
     viewController.title = [NCBrandOptions sharedInstance].brand;
     viewController.title = [NCBrandOptions sharedInstance].brand;
     viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
     viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
-    //viewController.navigationItem.leftBarButtonItem.tintColor = [NCBrandColor sharedInstance].cryptocloud;
+    viewController.navigationItem.leftBarButtonItem.tintColor = [NCBrandColor sharedInstance].encrypted;
     
     
     UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
     UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
     [self presentViewController:navController animated:YES completion:nil];
     [self presentViewController:navController animated:YES completion:nil];

+ 1 - 0
iOSClient/Main/CCMain.m

@@ -5186,6 +5186,7 @@
             
             
             viewController.title = NSLocalizedString(@"_folder_blocked_", nil);
             viewController.title = NSLocalizedString(@"_folder_blocked_", nil);
             viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
             viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
+            viewController.navigationItem.leftBarButtonItem.tintColor = [NCBrandColor sharedInstance].encrypted;
             
             
             UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
             UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
             [self presentViewController:navController animated:YES completion:nil];
             [self presentViewController:navController animated:YES completion:nil];

+ 0 - 1
iOSClient/Security/CCBKPasscode.h

@@ -30,7 +30,6 @@ typedef enum : NSUInteger {
     CCBKPasscodeFromInit,
     CCBKPasscodeFromInit,
     CCBKPasscodeFromLockDirectory,
     CCBKPasscodeFromLockDirectory,
     CCBKPasscodeFromDisactivateDirectory,
     CCBKPasscodeFromDisactivateDirectory,
-    CCBKPasscodeFromCheckCryptoKey,
     CCBKPasscodeFromCheckPassphrase,
     CCBKPasscodeFromCheckPassphrase,
     CCBKPasscodeFromSettingsPasscode,
     CCBKPasscodeFromSettingsPasscode,
     CCBKPasscodeFromSimply
     CCBKPasscodeFromSimply

+ 0 - 41
iOSClient/Settings/CCSettings.m

@@ -271,25 +271,6 @@
     }
     }
 }
 }
 
 
-- (void)checkEncryptPass:(XLFormRowDescriptor *)sender
-{
-    CCBKPasscode *viewController = [[CCBKPasscode alloc] initWithNibName:nil bundle:nil];
-    viewController.delegate = self;
-    viewController.fromType = CCBKPasscodeFromCheckCryptoKey;
-    viewController.type = BKPasscodeViewControllerCheckPasscodeType;
-    
-    viewController.passcodeStyle = BKPasscodeInputViewNormalPasscodeStyle;
-    viewController.passcodeInputView.maximumLength = 64;
-    
-    viewController.title = NSLocalizedString(@"_check_key_aes_256_", nil);
-    
-    viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
-    viewController.navigationItem.leftBarButtonItem.tintColor = [NCBrandColor sharedInstance].encrypted;
-    
-    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
-    [self presentViewController:navigationController animated:YES completion:nil];
-}
-
 - (void)changeSimplyPassword
 - (void)changeSimplyPassword
 {
 {
     CCBKPasscode *viewController = [[CCBKPasscode alloc] initWithNibName:nil bundle:nil];
     CCBKPasscode *viewController = [[CCBKPasscode alloc] initWithNibName:nil bundle:nil];
@@ -509,12 +490,6 @@
     }
     }
 }
 }
 
 
-- (void)sendMailEncryptPass
-{
-    if ([MFMailComposeViewController canSendMail])
-        [CCUtility sendMailEncryptPass:[CCUtility getEmail] validateEmail:NO form:self nameImage:@"backgroundDetail"];
-}
-
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark === BKPasscodeViewController ===
 #pragma mark === BKPasscodeViewController ===
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------
@@ -542,10 +517,6 @@
                 [app.activeMain.tableView reloadData];
                 [app.activeMain.tableView reloadData];
             }
             }
             
             
-            // email Key EAS-256
-            if (aViewController.fromType == CCBKPasscodeFromCheckCryptoKey)
-                [self sendMailEncryptPass];
-            
             // change simply
             // change simply
             if (aViewController.fromType == CCBKPasscodeFromSimply) {
             if (aViewController.fromType == CCBKPasscodeFromSimply) {
                 
                 
@@ -571,18 +542,6 @@
 
 
 - (void)passcodeViewController:(CCBKPasscode *)aViewController authenticatePasscode:(NSString *)aPasscode resultHandler:(void (^)(BOOL))aResultHandler
 - (void)passcodeViewController:(CCBKPasscode *)aViewController authenticatePasscode:(NSString *)aPasscode resultHandler:(void (^)(BOOL))aResultHandler
 {
 {
-    if (aViewController.fromType == CCBKPasscodeFromCheckCryptoKey) {
-        
-        NSString *key = [CCUtility getKeyChainPasscodeForUUID:[CCUtility getUUID]];
-        
-        if ([aPasscode isEqualToString:key]) {
-            self.lockUntilDate = nil;
-            self.failedAttempts = 0;
-            aResultHandler(YES);
-        } else aResultHandler(NO);
-        
-    }
-    
     if (aViewController.fromType == CCBKPasscodeFromSettingsPasscode || aViewController.fromType == CCBKPasscodeFromSimply) {
     if (aViewController.fromType == CCBKPasscodeFromSettingsPasscode || aViewController.fromType == CCBKPasscodeFromSimply) {
         
         
         if ([aPasscode isEqualToString:[CCUtility getBlockCode]]) {
         if ([aPasscode isEqualToString:[CCUtility getBlockCode]]) {

+ 2 - 1
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -210,7 +210,8 @@
         
         
         viewController.title = NSLocalizedString(@"_e2e_settings_read_passphrase_", nil);
         viewController.title = NSLocalizedString(@"_e2e_settings_read_passphrase_", nil);
         viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
         viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
-            
+        viewController.navigationItem.leftBarButtonItem.tintColor = [NCBrandColor sharedInstance].encrypted;
+        
         UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
         UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
         [self presentViewController:navigationController animated:YES completion:nil];
         [self presentViewController:navigationController animated:YES completion:nil];
         
         

+ 0 - 2
iOSClient/Utility/CCUtility.h

@@ -177,8 +177,6 @@
 + (NSString *)deletingLastPathComponentFromServerUrl:(NSString *)serverUrl;
 + (NSString *)deletingLastPathComponentFromServerUrl:(NSString *)serverUrl;
 + (NSString *)returnFileNamePathFromFileName:(NSString *)metadataFileName serverUrl:(NSString *)serverUrl activeUrl:(NSString *)activeUrl;
 + (NSString *)returnFileNamePathFromFileName:(NSString *)metadataFileName serverUrl:(NSString *)serverUrl activeUrl:(NSString *)activeUrl;
 
 
-+ (void)sendMailEncryptPass:(NSString *)recipient validateEmail:(BOOL)validateEmail form:(id)form nameImage:(NSString *)nameImage;
-
 + (NSArray *)createNameSubFolder:(PHFetchResult *)assets;
 + (NSArray *)createNameSubFolder:(PHFetchResult *)assets;
 
 
 // ===== CCMetadata =====
 // ===== CCMetadata =====

+ 0 - 43
iOSClient/Utility/CCUtility.m

@@ -854,49 +854,6 @@
     return fileName;
     return fileName;
 }
 }
 
 
-+ (void)sendMailEncryptPass:(NSString *)recipient validateEmail:(BOOL)validateEmail form:(id)form nameImage:(NSString *)nameImage
-{
-    BOOL error = NO;
-    
-    if (validateEmail)
-        error = ![self isValidEmail:recipient];
-    
-    if (!error)
-        error = ![MFMailComposeViewController canSendMail];
-    
-    if (!error) {
-        
-        NSString *key = [CCUtility getKeyChainPasscodeForUUID:[CCUtility getUUID]];
-        
-        MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
-        mc.mailComposeDelegate = form;
-        
-        [mc setSubject:NSLocalizedString(@"_title_mail_encryptpass_", nil)];
-        
-        NSString *htmlMsg =[NSString stringWithFormat:@"<html><body><p>%@ : %@ , %@</p></body></html>", NSLocalizedString(@"_text1_mail_encryptpass_", nil), key, NSLocalizedString(@"_text2_mail_encryptpass_", nil)];
-        
-        NSData *jpegData = UIImageJPEGRepresentation([UIImage imageNamed:nameImage], 1.0);
-        [mc addAttachmentData:jpegData mimeType:@"image/jpeg" fileName:@"cryptocloud.png"];
-        [mc setMessageBody:htmlMsg isHTML:YES];
-        
-        if ([self isValidEmail:recipient])
-            [mc setToRecipients:@[recipient]];
-        
-        [form presentViewController:mc animated:YES completion:NULL];
-        
-    } else {
-        
-        UIAlertController * alert= [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_error_", nil) message:NSLocalizedString(@"_mail_not_can_send_mail_", nil) preferredStyle:UIAlertControllerStyleAlert];
-        
-        UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil)  style:UIAlertActionStyleDefault
-                                                   handler:^(UIAlertAction * action) {
-                                                       [alert dismissViewControllerAnimated:YES completion:nil];
-                                                   }];
-        [alert addAction:ok];
-        [form presentViewController:alert animated:YES completion:nil];
-    }
-}
-
 + (NSArray *)createNameSubFolder:(PHFetchResult *)alassets
 + (NSArray *)createNameSubFolder:(PHFetchResult *)alassets
 {
 {
     NSMutableOrderedSet *datesSubFolder = [NSMutableOrderedSet new];
     NSMutableOrderedSet *datesSubFolder = [NSMutableOrderedSet new];