marinofaggiana 3 rokov pred
rodič
commit
088f9cb0c3

+ 3 - 0
iOSClient/Brand/NCBrand.swift

@@ -88,6 +88,9 @@ import UIKit
     @objc public var disable_openin_file:               Bool = false                                                // Don't touch me !!
     @objc public var disable_crash_service:             Bool = false
     @objc public var disable_request_account:           Bool = false
+    
+    @objc public var disable_background_color:          Bool = false
+    @objc public var disable_background_image:          Bool = true
 
     override init() {
         

+ 3 - 1
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -891,7 +891,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
                 
         listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_paste_file_", comment: ""), action: #selector(pasteFilesMenu)))
         if #available(iOS 13.0, *) {
-            listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_background_", comment: ""), action: #selector(backgroundFilesMenu)))
+            if !NCBrandOptions.shared.disable_background_color {
+                listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_background_", comment: ""), action: #selector(backgroundFilesMenu)))
+            }
         }
         
         if listMenuItems.count > 0 {

+ 1 - 1
iOSClient/Main/NCFunctionCenter.swift

@@ -619,7 +619,7 @@ import NCCommunication
             children.insert(viewInFolder, at: 5)
         }
         
-        if metadata.typeFile == NCGlobal.shared.metadataTypeFileImage && viewController is NCCollectionViewCommon {
+        if metadata.typeFile == NCGlobal.shared.metadataTypeFileImage && viewController is NCCollectionViewCommon && !NCBrandOptions.shared.disable_background_image {
             let viewController: NCCollectionViewCommon = viewController as! NCCollectionViewCommon
             let layoutKey = viewController.layoutKey
             if layoutKey == NCGlobal.shared.layoutViewFiles {

+ 1 - 1
iOSClient/Menu/NCCollectionViewCommon+Menu.swift

@@ -285,7 +285,7 @@ extension NCCollectionViewCommon {
         // USE AS BACKGROUND
         //
         if #available(iOS 13.0, *) {
-            if metadata.typeFile == NCGlobal.shared.metadataTypeFileImage && viewController.layoutKey == NCGlobal.shared.layoutViewFiles {
+            if metadata.typeFile == NCGlobal.shared.metadataTypeFileImage && viewController.layoutKey == NCGlobal.shared.layoutViewFiles && !NCBrandOptions.shared.disable_background_image {
                 actions.append(
                     NCMenuAction(
                         title: NSLocalizedString("_use_as_background_", comment: ""),