|
@@ -75,8 +75,11 @@
|
|
|
[form addFormSection:section];
|
|
|
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUpload" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_settings_autoupload_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"autoUpload"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
|
|
|
+
|
|
|
row.action.formSegueIdentifier = @"CCManageAutoUploadSegue";
|
|
|
[section addFormRow:row];
|
|
|
|
|
@@ -86,8 +89,10 @@
|
|
|
[form addFormSection:section];
|
|
|
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"favoriteoffline" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_favorite_offline_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
[row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"favorite"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Section : LOCK --------------------------------------------------------------
|
|
@@ -97,9 +102,10 @@
|
|
|
|
|
|
// Lock active YES/NO
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"bloccopasscode" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_lock_not_active_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
[row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"settingsPasscodeNO"] multiplier:2 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
- [row.cellConfig setObject:[UIColor blackColor] forKey:@"textLabel.textColor"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
|
|
|
//[row.cellConfig setObject:@(UITableViewCellAccessoryDisclosureIndicator) forKey:@"accessoryType"];
|
|
|
row.action.formSelector = @selector(bloccoPassword);
|
|
@@ -107,12 +113,30 @@
|
|
|
|
|
|
// Passcode simply
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"simplypasscode" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_lock_protection_simply_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Lock no screen
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"onlylockdir" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_lock_protection_no_screen_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
+ [section addFormRow:row];
|
|
|
+
|
|
|
+ // Section : Screen --------------------------------------------------------------
|
|
|
+
|
|
|
+ section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_screen_", nil)];
|
|
|
+ [form addFormSection:section];
|
|
|
+
|
|
|
+ // Dark Mode
|
|
|
+
|
|
|
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"darkMode" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_dark_mode_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"themeLightDark"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Section : E2EEncryption --------------------------------------------------------------
|
|
@@ -123,7 +147,9 @@
|
|
|
// EndToEnd Encryption
|
|
|
NSString *title = [NSString stringWithFormat:@"%@ (%@)",NSLocalizedString(@"_e2e_settings_", nil), NSLocalizedString(@"_experimental_", nil)];
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"e2eEncryption" rowType:XLFormRowDescriptorTypeButton title:title];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"lock"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
|
|
|
row.action.viewControllerClass = [NCManageEndToEndEncryption class];
|
|
|
[section addFormRow:row];
|
|
@@ -135,7 +161,9 @@
|
|
|
|
|
|
// Advanced
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"advanced" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_advanced_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"settings"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
|
|
|
row.action.viewControllerClass = [CCAdvanced class];
|
|
|
[section addFormRow:row];
|
|
@@ -147,9 +175,10 @@
|
|
|
|
|
|
// Acknowledgements
|
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"buttonLeftAligned" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_acknowledgements_", nil)];
|
|
|
+ row.cellConfigAtConfigure[@"backgroundColor"] = [NCBrandColor sharedInstance].backgroundView;
|
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
|
|
|
[row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
|
|
|
- [row.cellConfig setObject:[UIColor blackColor] forKey:@"textLabel.textColor"];
|
|
|
+ [row.cellConfig setObject:[NCBrandColor sharedInstance].textView forKey:@"textLabel.textColor"];
|
|
|
[row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"acknowledgements"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
|
|
|
row.action.formBlock = ^(XLFormRowDescriptor * sender){
|
|
|
[self performSegueWithIdentifier:@"AcknowledgementsSegue" sender:sender];
|
|
@@ -179,7 +208,6 @@
|
|
|
self.tableView.backgroundColor = [NCBrandColor sharedInstance].backgroundView;
|
|
|
self.tableView.showsVerticalScrollIndicator = NO;
|
|
|
|
|
|
- // Color
|
|
|
[appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
|
|
|
[appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
|
|
|
|
|
@@ -206,6 +234,7 @@
|
|
|
XLFormRowDescriptor *rowSimplyPasscode = [self.form formRowWithTag:@"simplypasscode"];
|
|
|
XLFormRowDescriptor *rowOnlyLockDir = [self.form formRowWithTag:@"onlylockdir"];
|
|
|
XLFormRowDescriptor *rowFavoriteOffline = [self.form formRowWithTag:@"favoriteoffline"];
|
|
|
+ XLFormRowDescriptor *rowDarkMode = [self.form formRowWithTag:@"darkMode"];
|
|
|
|
|
|
// ------------------------------------------------------------------
|
|
|
|
|
@@ -220,6 +249,7 @@
|
|
|
if ([CCUtility getSimplyBlockCode]) [rowSimplyPasscode setValue:@1]; else [rowSimplyPasscode setValue:@0];
|
|
|
if ([CCUtility getOnlyLockDir]) [rowOnlyLockDir setValue:@1]; else [rowOnlyLockDir setValue:@0];
|
|
|
if ([CCUtility getFavoriteOffline]) [rowFavoriteOffline setValue:@1]; else [rowFavoriteOffline setValue:@0];
|
|
|
+ if ([CCUtility getDarkMode]) [rowDarkMode setValue:@1]; else [rowDarkMode setValue:@0];
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
@@ -276,6 +306,22 @@
|
|
|
[CCUtility setFavoriteOffline:false];
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if ([rowDescriptor.tag isEqualToString:@"darkMode"]) {
|
|
|
+
|
|
|
+ if ([[rowDescriptor.value valueData] boolValue] == YES) {
|
|
|
+ [CCUtility setDarkMode:true];
|
|
|
+ } else {
|
|
|
+ [CCUtility setDarkMode:false];
|
|
|
+ }
|
|
|
+
|
|
|
+ (void)[[NCBrandColor sharedInstance] init];
|
|
|
+ [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
|
|
|
+ [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
|
|
|
+ self.tableView.backgroundColor = [NCBrandColor sharedInstance].backgroundView;
|
|
|
+ [self initializeForm];
|
|
|
+ [self reloadForm];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (void)changeSimplyPassword
|