marinofaggiana 5 tahun lalu
induk
melakukan
5b14bade6c

+ 8 - 0
iOSClient/Settings/CCSettings.m

@@ -131,6 +131,14 @@
     [form addFormSection:section];
     
     // Dark Mode
+    if (@available(iOS 13.0, *)) {
+        row = [XLFormRowDescriptor formRowDescriptorWithTag:@"darkModeAutomatic" rowType:XLFormRowDescriptorTypeBooleanSwitch title:[NSString stringWithFormat:@"%@ (beta)", NSLocalizedString(@"_dark_mode_automatic_", 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];
+    }
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"darkMode" rowType:XLFormRowDescriptorTypeBooleanSwitch title:[NSString stringWithFormat:@"%@ (beta)", NSLocalizedString(@"_dark_mode_", nil)]];
     row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.sharedInstance.backgroundView;

+ 1 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -107,6 +107,7 @@
 "_sharing_"                 = "Sharing";
 "_details_"                 = "Details";
 "_dark_mode_"               = "Dark mode";
+"_dark_mode_automatic_"     = "Use ";
 "_screen_"                  = "Screen";
 "_wipe_account_"            = "Account wiped from server";
 "_appconfig_view_title_"    = "Account configuration in progress...";