marinofaggiana 5 rokov pred
rodič
commit
a169a55435

+ 2 - 0
iOSClient/Main/CCMain.m

@@ -1622,6 +1622,8 @@
     viewController.includeImages = false;
     viewController.type = @"";
     viewController.titleButtonDone = NSLocalizedString(@"_move_", nil);
+    viewController.titleButtonDone1 = NSLocalizedString(@"_copy_", nil);
+    viewController.isButtonDone1Hide = false;
     viewController.layoutViewSelect = k_layout_view_move;
     
     [navigationController setModalPresentationStyle:UIModalPresentationFullScreen];

+ 6 - 6
iOSClient/Select/NCSelect.storyboard

@@ -17,7 +17,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="0HI-k1-SD0">
-                                <rect key="frame" x="0.0" y="44" width="375" height="563"/>
+                                <rect key="frame" x="0.0" y="44" width="375" height="553"/>
                                 <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="D7P-75-aB1">
                                     <size key="itemSize" width="0.0" height="0.0"/>
                                     <size key="headerReferenceSize" width="0.0" height="0.0"/>
@@ -31,10 +31,10 @@
                                 </connections>
                             </collectionView>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="un8-Xf-9Fb">
-                                <rect key="frame" x="0.0" y="607" width="375" height="60"/>
+                                <rect key="frame" x="0.0" y="597" width="375" height="70"/>
                                 <subviews>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QFB-w0-4Kc">
-                                        <rect key="frame" x="10" y="15" width="120" height="30"/>
+                                        <rect key="frame" x="10" y="20" width="120" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="30" id="E2W-Hd-QqN"/>
                                             <constraint firstAttribute="width" constant="120" id="Nyx-sm-Sr7"/>
@@ -45,7 +45,7 @@
                                         </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gUK-Yw-aVP">
-                                        <rect key="frame" x="287" y="15" width="70" height="30"/>
+                                        <rect key="frame" x="287" y="20" width="70" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="70" id="fDv-lp-fXV"/>
                                             <constraint firstAttribute="height" constant="30" id="jeT-Z9-lQr"/>
@@ -56,7 +56,7 @@
                                         </connections>
                                     </button>
                                     <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kze-s7-kTI">
-                                        <rect key="frame" x="192" y="15" width="70" height="30"/>
+                                        <rect key="frame" x="192" y="20" width="70" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="30" id="Hfn-8s-27i"/>
                                             <constraint firstAttribute="width" constant="70" id="S9y-Wh-wjq"/>
@@ -71,7 +71,7 @@
                                 <constraints>
                                     <constraint firstItem="kze-s7-kTI" firstAttribute="centerY" secondItem="un8-Xf-9Fb" secondAttribute="centerY" id="899-zh-WyZ"/>
                                     <constraint firstAttribute="trailing" secondItem="gUK-Yw-aVP" secondAttribute="trailing" constant="18" id="OEt-Jd-Y4n"/>
-                                    <constraint firstAttribute="height" constant="60" id="TsU-bO-Yu0"/>
+                                    <constraint firstAttribute="height" constant="70" id="TsU-bO-Yu0"/>
                                     <constraint firstItem="gUK-Yw-aVP" firstAttribute="leading" secondItem="kze-s7-kTI" secondAttribute="trailing" constant="25" id="YEP-mX-zEQ"/>
                                     <constraint firstItem="gUK-Yw-aVP" firstAttribute="centerY" secondItem="un8-Xf-9Fb" secondAttribute="centerY" id="he9-pn-vUn"/>
                                     <constraint firstItem="QFB-w0-4Kc" firstAttribute="leading" secondItem="un8-Xf-9Fb" secondAttribute="leading" constant="10" id="pcs-Y5-Jp6"/>

+ 20 - 1
iOSClient/Select/NCSelect.swift

@@ -35,7 +35,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
     @IBOutlet fileprivate weak var buttonCancel: UIBarButtonItem!
     @IBOutlet fileprivate weak var buttonCreateFolder: UIButton!
     @IBOutlet fileprivate weak var buttonDone: UIButton!
-    @IBOutlet fileprivate weak var buttonDone1: UIButton!
+    @IBOutlet fileprivate var buttonDone1: UIButton!
 
     // ------ external settings ------------------------------------
     @objc var delegate: NCSelectDelegate?
@@ -47,6 +47,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
     @objc var type = ""
     @objc var titleButtonDone = NSLocalizedString("_move_", comment: "")
     @objc var titleButtonDone1 = NSLocalizedString("_copy_", comment: "")
+    @objc var isButtonDone1Hide = true
     @objc var layoutViewSelect = k_layout_view_move
     
     var titleCurrentFolder = NCBrandOptions.sharedInstance.brand
@@ -129,6 +130,22 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
         buttonCancel.title = NSLocalizedString("_cancel_", comment: "")
         buttonCreateFolder.setTitle(NSLocalizedString("_create_folder_", comment: ""), for: .normal)
         
+        // button
+        buttonCreateFolder.layer.cornerRadius = 15
+        buttonCreateFolder.layer.masksToBounds = true
+        buttonCreateFolder.layer.backgroundColor = NCBrandColor.sharedInstance.graySoft.withAlphaComponent(0.5).cgColor
+        buttonCreateFolder.setTitleColor(.black, for: .normal)
+
+        buttonDone.layer.cornerRadius = 15
+        buttonDone.layer.masksToBounds = true
+        buttonDone.layer.backgroundColor = NCBrandColor.sharedInstance.graySoft.withAlphaComponent(0.5).cgColor
+        buttonDone.setTitleColor(.black, for: .normal)
+        
+        buttonDone1.layer.cornerRadius = 15
+        buttonDone1.layer.masksToBounds = true
+        buttonDone1.layer.backgroundColor = NCBrandColor.sharedInstance.graySoft.withAlphaComponent(0.5).cgColor
+        buttonDone1.setTitleColor(.black, for: .normal)
+        
         // changeTheming
         NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: k_notificationCenter_changeTheming), object: nil)
         changeTheming()
@@ -140,6 +157,8 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
         self.navigationItem.title = titleCurrentFolder
         
         buttonDone.setTitle(titleButtonDone, for: .normal)
+        buttonDone1.setTitle(titleButtonDone1, for: .normal)
+        buttonDone1.isHidden = isButtonDone1Hide
         
         if selectFile {
             buttonDone.isEnabled = false