NCSettings.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. //
  2. // NCSettings.m
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 24/11/14.
  6. // Copyright (c) 2014 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. #import "NCSettings.h"
  24. #import "CCAdvanced.h"
  25. #import "CCManageAccount.h"
  26. #import "CCManageAutoUpload.h"
  27. #import "NCManageEndToEndEncryption.h"
  28. #import "NCBridgeSwift.h"
  29. #import "NSNotificationCenter+MainThread.h"
  30. #import <LocalAuthentication/LocalAuthentication.h>
  31. #import <TOPasscodeViewController/TOPasscodeViewController.h>
  32. #define alertViewEsci 1
  33. #define alertViewAzzeraCache 2
  34. @interface NCSettings () <TOPasscodeSettingsViewControllerDelegate, TOPasscodeViewControllerDelegate>
  35. {
  36. AppDelegate *appDelegate;
  37. TOPasscodeViewController *passcodeViewController;
  38. TOPasscodeSettingsViewController *passcodeSettingsViewController;
  39. }
  40. @end
  41. @implementation NCSettings
  42. - (void)initializeForm
  43. {
  44. XLFormDescriptor *form = [XLFormDescriptor formDescriptor];
  45. XLFormSectionDescriptor *section;
  46. XLFormRowDescriptor *row;
  47. //NSInteger serverVersionMajor = [[NCManageDatabase shared] getCapabilitiesServerIntWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesVersionMajor];
  48. form.rowNavigationOptions = XLFormRowNavigationOptionNone;
  49. // Section AUTO UPLOAD OF CAMERA IMAGES ----------------------------
  50. section = [XLFormSectionDescriptor formSection];
  51. [form addFormSection:section];
  52. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUpload" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_settings_autoupload_", nil)];
  53. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  54. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  55. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  56. [row.cellConfig setObject:[[UIImage imageNamed:@"autoUpload"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  57. row.action.viewControllerClass = [CCManageAutoUpload class];
  58. [section addFormRow:row];
  59. // Section : PRIVACY --------------------------------------------------------------
  60. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_privacy_", nil)];
  61. [form addFormSection:section];
  62. // Lock active YES/NO
  63. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"bloccopasscode" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_lock_not_active_", nil)];
  64. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  65. [row.cellConfig setObject:[[UIImage imageNamed:@"lock_open"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  66. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  67. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  68. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  69. //[row.cellConfig setObject:@(UITableViewCellAccessoryDisclosureIndicator) forKey:@"accessoryType"];
  70. row.action.formSelector = @selector(passcode:);
  71. [section addFormRow:row];
  72. // Enable Touch ID
  73. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"enableTouchDaceID" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_enable_touch_face_id_", nil)];
  74. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  75. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  76. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  77. [section addFormRow:row];
  78. // Lock no screen
  79. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"notPasscodeAtStart" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_lock_protection_no_screen_", nil)];
  80. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  81. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  82. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  83. [section addFormRow:row];
  84. // Privacy screen
  85. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"privacyScreen" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_privacy_screen_", nil)];
  86. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  87. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  88. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  89. [section addFormRow:row];
  90. // Section : E2EEncryption --------------------------------------------------------------
  91. BOOL isE2EEEnabled = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesE2EEEnabled exists:false];
  92. NSString *versionE2EE = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesE2EEApiVersion];
  93. if (isE2EEEnabled == YES && [versionE2EE isEqual:[[NCGlobal shared] e2eeVersion]]) {
  94. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_e2e_settings_title_", nil)];
  95. [form addFormSection:section];
  96. // EndToEnd Encryption
  97. NSString *title = [NSString stringWithFormat:@"%@",NSLocalizedString(@"_e2e_settings_", nil)];
  98. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"e2eEncryption" rowType:XLFormRowDescriptorTypeButton title:title];
  99. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  100. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  101. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  102. [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  103. row.action.viewControllerClass = [NCManageEndToEndEncryption class];
  104. [section addFormRow:row];
  105. }
  106. // Section Advanced -------------------------------------------------
  107. section = [XLFormSectionDescriptor formSection];
  108. [form addFormSection:section];
  109. // Advanced
  110. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"advanced" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_advanced_", nil)];
  111. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  112. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  113. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  114. [row.cellConfig setObject:[[UIImage imageNamed:@"gear"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  115. row.action.viewControllerClass = [CCAdvanced class];
  116. [section addFormRow:row];
  117. // Section : INFORMATION ------------------------------------------------
  118. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_information_", nil)];
  119. [form addFormSection:section];
  120. // Acknowledgements
  121. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"buttonLeftAligned" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_acknowledgements_", nil)];
  122. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  123. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  124. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  125. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  126. [row.cellConfig setObject:[[UIImage imageNamed:@"acknowledgements"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  127. row.action.formBlock = ^(XLFormRowDescriptor * sender){
  128. [self performSegueWithIdentifier:@"AcknowledgementsSegue" sender:sender];
  129. [self deselectFormRow:sender];
  130. };
  131. [section addFormRow:row];
  132. if (!NCBrandOptions.shared.disable_crash_service) {
  133. // Privacy and Legal Policy
  134. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"privacy" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_privacy_legal_", nil)];
  135. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  136. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  137. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  138. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  139. [row.cellConfig setObject:[[UIImage imageNamed:@"shield.checkerboard"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  140. row.action.formSelector = @selector(privacy:);
  141. [section addFormRow:row];
  142. // Source code
  143. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"sourcecode" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_source_code_", nil)];
  144. row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
  145. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  146. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  147. [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
  148. [row.cellConfig setObject:[[UIImage imageNamed:@"gitHub"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  149. row.action.formSelector = @selector(sourceCode:);
  150. [section addFormRow:row];
  151. }
  152. self.tableView.showsVerticalScrollIndicator = NO;
  153. self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 35, 0);
  154. self.form = form;
  155. }
  156. // MARK: - View Life Cycle
  157. - (void)viewDidLoad
  158. {
  159. [super viewDidLoad];
  160. self.title = NSLocalizedString(@"_settings_", nil);
  161. self.view.backgroundColor = UIColor.systemGroupedBackgroundColor;
  162. self.tableView.backgroundColor = UIColor.systemGroupedBackgroundColor;
  163. appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
  164. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground) name:NCGlobal.shared.notificationCenterApplicationDidEnterBackground object:nil];
  165. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initialize) name:NCGlobal.shared.notificationCenterInitialize object:nil];
  166. [self initializeForm];
  167. [self reloadForm];
  168. }
  169. - (void)viewWillAppear:(BOOL)animated
  170. {
  171. [super viewWillAppear:animated];
  172. appDelegate.activeViewController = self;
  173. }
  174. #pragma mark - NotificationCenter
  175. - (void)initialize
  176. {
  177. [self initializeForm];
  178. [self reloadForm];
  179. }
  180. - (void)applicationDidEnterBackground
  181. {
  182. if (passcodeViewController.view.window != nil) {
  183. [passcodeViewController dismissViewControllerAnimated:true completion:nil];
  184. }
  185. if (passcodeSettingsViewController.view.window != nil) {
  186. [passcodeSettingsViewController dismissViewControllerAnimated:true completion:nil];
  187. }
  188. [[self navigationController] popToRootViewControllerAnimated:false];
  189. }
  190. #pragma mark -
  191. - (void)reloadForm
  192. {
  193. self.form.delegate = nil;
  194. // ------------------------------------------------------------------
  195. XLFormRowDescriptor *rowBloccoPasscode = [self.form formRowWithTag:@"bloccopasscode"];
  196. XLFormRowDescriptor *rowNotPasscodeAtStart = [self.form formRowWithTag:@"notPasscodeAtStart"];
  197. XLFormRowDescriptor *rowEnableTouchDaceID = [self.form formRowWithTag:@"enableTouchDaceID"];
  198. XLFormRowDescriptor *rowPrivacyScreen = [self.form formRowWithTag:@"privacyScreen"];
  199. // ------------------------------------------------------------------
  200. if ([[CCUtility getPasscode] length]) {
  201. rowBloccoPasscode.title = NSLocalizedString(@"_lock_active_", nil);
  202. [rowBloccoPasscode.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  203. } else {
  204. rowBloccoPasscode.title = NSLocalizedString(@"_lock_not_active_", nil);
  205. [rowBloccoPasscode.cellConfig setObject:[[UIImage imageNamed:@"lock_open"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
  206. }
  207. if ([CCUtility getEnableTouchFaceID]) [rowEnableTouchDaceID setValue:@1]; else [rowEnableTouchDaceID setValue:@0];
  208. if ([CCUtility getNotPasscodeAtStart]) [rowNotPasscodeAtStart setValue:@1]; else [rowNotPasscodeAtStart setValue:@0];
  209. if ([CCUtility getPrivacyScreenEnabled]) [rowPrivacyScreen setValue:@1]; else [rowPrivacyScreen setValue:@0];
  210. // -----------------------------------------------------------------
  211. [self.tableView reloadData];
  212. self.form.delegate = self;
  213. }
  214. - (void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue
  215. {
  216. [super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue];
  217. if ([rowDescriptor.tag isEqualToString:@"notPasscodeAtStart"]) {
  218. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  219. [CCUtility setNotPasscodeAtStart:true];
  220. } else {
  221. [CCUtility setNotPasscodeAtStart:false];
  222. }
  223. }
  224. if ([rowDescriptor.tag isEqualToString:@"enableTouchDaceID"]) {
  225. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  226. [CCUtility setEnableTouchFaceID:true];
  227. } else {
  228. [CCUtility setEnableTouchFaceID:false];
  229. }
  230. }
  231. if ([rowDescriptor.tag isEqualToString:@"privacyScreen"]) {
  232. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  233. [CCUtility setPrivacyScreenEnabled:true];
  234. } else {
  235. [CCUtility setPrivacyScreenEnabled:false];
  236. }
  237. }
  238. }
  239. #pragma mark -
  240. - (void)privacy:(XLFormRowDescriptor *)sender
  241. {
  242. [self deselectFormRow:sender];
  243. NCBrowserWeb* browserWebVC = [[UIStoryboard storyboardWithName:@"NCBrowserWeb" bundle:nil] instantiateInitialViewController];
  244. browserWebVC.urlBase = NCBrandOptions.shared.privacy;
  245. browserWebVC.isHiddenButtonExit = false;
  246. browserWebVC.titleBrowser = NSLocalizedString(@"_privacy_", nil);
  247. [self presentViewController:browserWebVC animated:YES completion:nil];
  248. }
  249. - (void)sourceCode:(XLFormRowDescriptor *)sender
  250. {
  251. [self deselectFormRow:sender];
  252. NCBrowserWeb* browserWebVC = [[UIStoryboard storyboardWithName:@"NCBrowserWeb" bundle:nil] instantiateInitialViewController];
  253. browserWebVC.urlBase = NCBrandOptions.shared.sourceCode;
  254. browserWebVC.isHiddenButtonExit = false;
  255. browserWebVC.titleBrowser = NSLocalizedString(@"_source_code_", nil);
  256. [self presentViewController:browserWebVC animated:YES completion:nil];
  257. }
  258. #pragma mark - Passcode
  259. - (void)didPerformBiometricValidationRequestInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
  260. {
  261. [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:[[NCBrandOptions shared] brand] reply:^(BOOL success, NSError * _Nullable error) {
  262. if (success) {
  263. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
  264. [CCUtility setPasscode:@""];
  265. [passcodeViewController dismissViewControllerAnimated:YES completion:nil];
  266. [self reloadForm];
  267. });
  268. }
  269. }];
  270. }
  271. - (void)passcodeSettingsViewController:(TOPasscodeSettingsViewController *)passcodeSettingsViewController didChangeToNewPasscode:(NSString *)passcode ofType:(TOPasscodeType)type
  272. {
  273. [CCUtility setPasscode:passcode];
  274. [passcodeSettingsViewController dismissViewControllerAnimated:YES completion:nil];
  275. [self reloadForm];
  276. }
  277. - (void)didTapCancelInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
  278. {
  279. [passcodeViewController dismissViewControllerAnimated:YES completion:nil];
  280. }
  281. - (BOOL)passcodeViewController:(TOPasscodeViewController *)passcodeViewController isCorrectCode:(NSString *)code
  282. {
  283. if ([code isEqualToString:[CCUtility getPasscode]]) {
  284. [CCUtility setPasscode:@""];
  285. [self reloadForm];
  286. return YES;
  287. }
  288. return NO;
  289. }
  290. - (void)passcode:(XLFormRowDescriptor *)sender
  291. {
  292. LAContext *laContext = [LAContext new];
  293. NSError *error;
  294. [self deselectFormRow:sender];
  295. if ([[CCUtility getPasscode] length] == 0) {
  296. passcodeSettingsViewController = [[TOPasscodeSettingsViewController alloc] init];
  297. passcodeSettingsViewController.hideOptionsButton = YES;
  298. passcodeSettingsViewController.requireCurrentPasscode = NO;
  299. passcodeSettingsViewController.passcodeType = TOPasscodeTypeSixDigits;
  300. passcodeSettingsViewController.delegate = self;
  301. [self presentViewController:passcodeSettingsViewController animated:YES completion:nil];
  302. } else {
  303. passcodeViewController = [[TOPasscodeViewController alloc] initPasscodeType:TOPasscodeTypeSixDigits allowCancel:true];
  304. passcodeViewController.delegate = self;
  305. passcodeViewController.keypadButtonShowLettering = false;
  306. if (CCUtility.getEnableTouchFaceID && [laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
  307. if (error == NULL) {
  308. if (laContext.biometryType == LABiometryTypeFaceID) {
  309. passcodeViewController.biometryType = TOPasscodeBiometryTypeFaceID;
  310. passcodeViewController.allowBiometricValidation = true;
  311. passcodeViewController.automaticallyPromptForBiometricValidation = true;
  312. } else if (laContext.biometryType == LABiometryTypeTouchID) {
  313. passcodeViewController.biometryType = TOPasscodeBiometryTypeTouchID;
  314. passcodeViewController.allowBiometricValidation = true;
  315. passcodeViewController.automaticallyPromptForBiometricValidation = true;
  316. } else {
  317. NSLog(@"No Biometric support");
  318. }
  319. }
  320. }
  321. [self presentViewController:passcodeViewController animated:YES completion:nil];
  322. }
  323. }
  324. #pragma mark -
  325. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  326. return NCGlobal.shared.heightCellSettings;
  327. }
  328. - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
  329. {
  330. NSString *sectionName;
  331. NSInteger numSections = [tableView numberOfSections] - 1;
  332. if (section == 1) {
  333. sectionName = NSLocalizedString(@"_lock_protection_no_screen_footer_", nil);
  334. } else if (section == numSections) {
  335. NSString *versionServer = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesVersionString];
  336. NSString *themingName = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesThemingName];
  337. NSString *themingSlogan = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesThemingSlogan];
  338. NSString *versionNextcloud = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudServer, versionServer];
  339. NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, [[NCUtility shared] getVersionAppWithBuild:true]];
  340. NSString *nameSlogan = [NSString stringWithFormat:@"%@ - %@", themingName, themingSlogan];
  341. sectionName = [NSString stringWithFormat:@"\n%@\n\n%@\n%@", versionNextcloudiOS, versionNextcloud, nameSlogan];
  342. }
  343. return sectionName;
  344. }
  345. @end