diff options
Diffstat (limited to 'iOSClient/Settings/CCAdvanced.m')
-rwxr-xr-x | iOSClient/Settings/CCAdvanced.m | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/iOSClient/Settings/CCAdvanced.m b/iOSClient/Settings/CCAdvanced.m index f9d010122..cd8b8d78b 100755 --- a/iOSClient/Settings/CCAdvanced.m +++ b/iOSClient/Settings/CCAdvanced.m @@ -47,11 +47,11 @@ [form addFormSection:section]; row = [XLFormRowDescriptor formRowDescriptorWithTag:@"showHiddenFiles" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_show_hidden_files_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; if ([CCUtility getShowHiddenFiles]) row.value = @"1"; else row.value = @"0"; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [section addFormRow:row]; // Format Compatibility + Live Photo + Delete asset @@ -61,27 +61,27 @@ section.footerTitle = [NSString stringWithFormat:@"%@\n%@\n%@", NSLocalizedString(@"_format_compatibility_footer_", nil), NSLocalizedString(@"_upload_mov_livephoto_footer_", nil), NSLocalizedString(@"_remove_photo_CameraRoll_desc_", nil)]; row = [XLFormRowDescriptor formRowDescriptorWithTag:@"formatCompatibility" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_format_compatibility_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; if ([CCUtility getFormatCompatibility]) row.value = @"1"; else row.value = @"0"; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [section addFormRow:row]; row = [XLFormRowDescriptor formRowDescriptorWithTag:@"livePhoto" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_upload_mov_livephoto_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; if ([CCUtility getLivePhoto]) row.value = @"1"; else row.value = @"0"; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [section addFormRow:row]; row = [XLFormRowDescriptor formRowDescriptorWithTag:@"removePhotoCameraRoll" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_remove_photo_CameraRoll_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; if ([CCUtility getRemovePhotoCameraRoll]) row.value = @"1"; else row.value = @0; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [section addFormRow:row]; // Section : Files App -------------------------------------------------------------- @@ -94,11 +94,11 @@ // Disable Files App row = [XLFormRowDescriptor formRowDescriptorWithTag:@"disablefilesapp" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_disable_files_app_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; if ([CCUtility getDisableFilesApp]) row.value = @"1"; else row.value = @"0"; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [section addFormRow:row]; } @@ -109,10 +109,10 @@ section.footerTitle = NSLocalizedString(@"_chunk_footer_title_", nil); row = [XLFormRowDescriptor formRowDescriptorWithTag:@"chunk" rowType:XLFormRowDescriptorTypeStepCounter title:NSLocalizedString(@"_chunk_size_mb_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; row.value = [NSString stringWithFormat:@"%ld", CCUtility.getChunkSize]; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [row.cellConfigAtConfigure setObject:@YES forKey:@"stepControl.wraps"]; [row.cellConfigAtConfigure setObject:@1 forKey:@"stepControl.stepValue"]; [row.cellConfigAtConfigure setObject:@0 forKey:@"stepControl.minimumValue"]; @@ -128,9 +128,9 @@ section.footerTitle = NSLocalizedString(@"_privacy_footer_", nil); row = [XLFormRowDescriptor formRowDescriptorWithTag:@"crashservice" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_crashservice_title_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [row.cellConfig setObject:[[UIImage imageNamed:@"crashservice"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"]; if ([CCUtility getDisableCrashservice]) row.value = @"1"; else row.value = @"0"; @@ -142,49 +142,49 @@ section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_diagnostics_", nil)]; [form addFormSection:section]; - if ([[NSFileManager defaultManager] fileExistsAtPath:NCCommunicationCommon.shared.filenamePathLog] && NCBrandOptions.shared.disable_log == false) { + if ([[NSFileManager defaultManager] fileExistsAtPath:NKCommon.shared.filenamePathLog] && NCBrandOptions.shared.disable_log == false) { row = [XLFormRowDescriptor formRowDescriptorWithTag:@"log" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_view_log_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; [row.cellConfig setObject:[[UIImage imageNamed:@"log"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"]; row.action.formBlock = ^(XLFormRowDescriptor * sender) { [self deselectFormRow:sender]; - NCViewerQuickLook *viewerQuickLook = [[NCViewerQuickLook alloc] initWith:[NSURL fileURLWithPath:NCCommunicationCommon.shared.filenamePathLog] isEditingEnabled:false metadata:nil]; + NCViewerQuickLook *viewerQuickLook = [[NCViewerQuickLook alloc] initWith:[NSURL fileURLWithPath:NKCommon.shared.filenamePathLog] isEditingEnabled:false metadata:nil]; [self presentViewController:viewerQuickLook animated:YES completion:nil]; }; [section addFormRow:row]; row = [XLFormRowDescriptor formRowDescriptorWithTag:@"clearlog" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_clear_log_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; [row.cellConfig setObject:[[UIImage imageNamed:@"clear"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"]; row.action.formBlock = ^(XLFormRowDescriptor * sender) { [self deselectFormRow:sender]; - [[NCCommunicationCommon shared] clearFileLog]; + [[NKCommon shared] clearFileLog]; NSInteger logLevel = [CCUtility getLogLevel]; BOOL isSimulatorOrTestFlight = [[NCUtility shared] isSimulatorOrTestFlight]; NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, [[NCUtility shared] getVersionAppWithBuild:true]]; if (isSimulatorOrTestFlight) { - [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Clear log with level %lu %@ (Simulator / TestFlight)", (unsigned long)logLevel, versionNextcloudiOS]]; + [[NKCommon shared] writeLog:[NSString stringWithFormat:@"[INFO] Clear log with level %lu %@ (Simulator / TestFlight)", (unsigned long)logLevel, versionNextcloudiOS]]; } else { - [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Clear log with level %lu %@", (unsigned long)logLevel, versionNextcloudiOS]]; + [[NKCommon shared] writeLog:[NSString stringWithFormat:@"[INFO] Clear log with level %lu %@", (unsigned long)logLevel, versionNextcloudiOS]]; } }; [section addFormRow:row]; row = [XLFormRowDescriptor formRowDescriptorWithTag:@"logLevel" rowType:XLFormRowDescriptorTypeSlider title:NSLocalizedString(@"_level_log_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; [row.cellConfig setObject:@(NSTextAlignmentCenter) forKey:@"textLabel.textAlignment"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; NSInteger logLevel = [CCUtility getLogLevel]; row.value = @(logLevel); @@ -195,9 +195,9 @@ } row = [XLFormRowDescriptor formRowDescriptorWithTag:@"capabilities" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_capabilities_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; [row.cellConfig setObject:[[UIImage imageNamed:@"capabilities"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"]; row.action.formBlock = ^(XLFormRowDescriptor * sender) { @@ -245,8 +245,8 @@ } [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; row.selectorTitle = NSLocalizedString(@"_delete_old_files_", nil); row.selectorOptions = @[[XLFormOptionsObject formOptionsObjectWithValue:@(0) displayText:NSLocalizedString(@"_never_", nil)], [XLFormOptionsObject formOptionsObjectWithValue:@(365) displayText:NSLocalizedString(@"_1_year_", nil)], @@ -260,9 +260,9 @@ // Clear cache row = [XLFormRowDescriptor formRowDescriptorWithTag:@"azzeracache" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_clear_cache_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; - [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"]; + [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"]; [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"]; [row.cellConfig setObject:[[UIImage imageNamed:@"trash"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"]; row.action.formSelector = @selector(clearCacheRequest:); @@ -276,7 +276,7 @@ // Exit row = [XLFormRowDescriptor formRowDescriptorWithTag:@"esci" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_exit_", nil)]; - row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground; + row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor; [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"]; [row.cellConfig setObject:[UIColor redColor] forKey:@"textLabel.textColor"]; [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"]; @@ -296,9 +296,9 @@ self.title = NSLocalizedString(@"_advanced_", nil); appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; - self.view.backgroundColor = NCBrandColor.shared.systemGroupedBackground; + self.view.backgroundColor = UIColor.systemGroupedBackgroundColor; - self.tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground; + self.tableView.backgroundColor = UIColor.systemGroupedBackgroundColor; [self initializeForm]; [self calculateSize]; @@ -359,7 +359,7 @@ NSInteger levelLog = [[rowDescriptor.value valueData] intValue]; [CCUtility setLogLevel:levelLog]; - [[NCCommunicationCommon shared] setLevelLog:levelLog]; + [[NKCommon shared] setLevelLog:levelLog]; } if ([rowDescriptor.tag isEqualToString:@"chunk"]) { @@ -416,7 +416,7 @@ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:NSLocalizedString(@"_want_delete_cache_", nil) preferredStyle:UIAlertControllerStyleActionSheet]; [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_yes_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { - [[NCActivityIndicator shared] startActivityWithBackgroundView:nil style: UIActivityIndicatorViewStyleWhiteLarge]; + [[NCActivityIndicator shared] startActivityWithBackgroundView:nil style: UIActivityIndicatorViewStyleLarge]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) { [self clearCache]; }); |