Ver código fonte

Improved Select view

marinofaggiana 3 anos atrás
pai
commit
975ca683f5

+ 6 - 0
Nextcloud.xcodeproj/project.pbxproj

@@ -311,6 +311,8 @@
 		F7EDE4EA262D7C6C00414FE6 /* NCSortMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7CBC31B24F78E79004D3812 /* NCSortMenu.swift */; };
 		F7EDE4EF262D7C8500414FE6 /* NCMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 371B5A2D23D0B04500FAFAE9 /* NCMenu.swift */; };
 		F7EDE4F4262D7C9A00414FE6 /* NCOperationQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = F72A47EB2487B06B005AD489 /* NCOperationQueue.swift */; };
+		F7EDE509262DA9D600414FE6 /* NCSelectCommandViewSelect.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7EDE508262DA9D600414FE6 /* NCSelectCommandViewSelect.xib */; };
+		F7EDE50A262DA9D600414FE6 /* NCSelectCommandViewSelect.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7EDE508262DA9D600414FE6 /* NCSelectCommandViewSelect.xib */; };
 		F7EFA47825ADBA500083159A /* NCViewerProviderContextMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EFA47725ADBA500083159A /* NCViewerProviderContextMenu.swift */; };
 		F7EFC0C6256BC77700461AAD /* NCMoreUserCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7EFC0C5256BC77700461AAD /* NCMoreUserCell.xib */; };
 		F7EFC0CD256BF8DD00461AAD /* NCUserStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EFC0CC256BF8DD00461AAD /* NCUserStatus.swift */; };
@@ -695,6 +697,7 @@
 		F7E45E6D21E75BF200579249 /* ja-JP */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ja-JP"; path = "ja-JP.lproj/Localizable.strings"; sourceTree = "<group>"; };
 		F7E4D9C322ED929B003675FD /* NCShareComments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCShareComments.swift; sourceTree = "<group>"; };
 		F7E856182351D7BE009A3330 /* SwiftyXMLParser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftyXMLParser.framework; path = Carthage/Build/iOS/SwiftyXMLParser.framework; sourceTree = "<group>"; };
+		F7EDE508262DA9D600414FE6 /* NCSelectCommandViewSelect.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCSelectCommandViewSelect.xib; sourceTree = "<group>"; };
 		F7EFA47725ADBA500083159A /* NCViewerProviderContextMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCViewerProviderContextMenu.swift; sourceTree = "<group>"; };
 		F7EFC0C5256BC77700461AAD /* NCMoreUserCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCMoreUserCell.xib; sourceTree = "<group>"; };
 		F7EFC0CC256BF8DD00461AAD /* NCUserStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCUserStatus.swift; sourceTree = "<group>"; };
@@ -1147,6 +1150,7 @@
 			children = (
 				F79A65C22191D90F00FF6DCC /* NCSelect.storyboard */,
 				F79A65C52191D95E00FF6DCC /* NCSelect.swift */,
+				F7EDE508262DA9D600414FE6 /* NCSelectCommandViewSelect.xib */,
 			);
 			path = Select;
 			sourceTree = "<group>";
@@ -1809,6 +1813,7 @@
 				F78B9686234F785300F54315 /* NCSelectDestination.storyboard in Resources */,
 				F78BFEE11D31126B00E513CF /* MainInterface.storyboard in Resources */,
 				F7145A1A1D12E3B700CAFEEC /* Images.xcassets in Resources */,
+				F7EDE50A262DA9D600414FE6 /* NCSelectCommandViewSelect.xib in Resources */,
 				F7F8D71D1ED6183000E711F3 /* CCCellShareExt.xib in Resources */,
 				F7145A231D12E3B700CAFEEC /* Localizable.strings in Resources */,
 				F700222D1EC479840080073F /* Custom.xcassets in Resources */,
@@ -1877,6 +1882,7 @@
 				F78ACD54219047D40088454D /* NCSectionFooter.xib in Resources */,
 				F704B5E32430AA6F00632F5F /* NCCreateFormUploadConflict.storyboard in Resources */,
 				F77B0F611D118A16002130FE /* Acknowledgements.rtf in Resources */,
+				F7EDE509262DA9D600414FE6 /* NCSelectCommandViewSelect.xib in Resources */,
 				F73D11FA253C5F4800DF9BEC /* NCViewerNextcloudText.storyboard in Resources */,
 				F73B422B2476764F00A30FD3 /* NCNotification.storyboard in Resources */,
 				F7D1612023CF19E30039EBBF /* NCViewerRichWorkspace.storyboard in Resources */,

+ 4 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadAssets.swift

@@ -521,11 +521,12 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         let viewController = navigationController.topViewController as! NCSelect
         
         viewController.delegate = self
-        viewController.hideButtonCreateFolder = false
+        viewController.typeOfCommandView = .select
         viewController.includeDirectoryE2EEncryption = true
         viewController.includeImages = false
-        viewController.selectFile = false
-        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
+//        viewController.hideButtonCreateFolder = false
+//        viewController.selectFile = false
+//        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
         viewController.type = ""
         
         navigationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen

+ 6 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift

@@ -243,11 +243,14 @@ import NCCommunication
         let viewController = navigationController.topViewController as! NCSelect
         
         viewController.delegate = self
-        viewController.hideButtonCreateFolder = false
+        viewController.typeOfCommandView = .select
         viewController.includeDirectoryE2EEncryption = false
         viewController.includeImages = false
-        viewController.selectFile = false
-        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
+        
+        //viewController.hideButtonCreateFolder = false
+        //viewController.selectFile = false
+        //viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
+        
         viewController.type = ""
 
         navigationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen

+ 5 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift

@@ -620,13 +620,15 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
         let viewController = navigationController.topViewController as! NCSelect
         
         viewController.delegate = self
-        viewController.hideButtonCreateFolder = false
+        viewController.typeOfCommandView = .select
         viewController.includeDirectoryE2EEncryption = true
         viewController.includeImages = false
-        viewController.selectFile = false
-        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
         viewController.type = ""
         
+//        viewController.hideButtonCreateFolder = false
+//        viewController.selectFile = false
+//        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
+        
         navigationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
         self.present(navigationController, animated: true, completion: nil)
     }

+ 5 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.swift

@@ -277,13 +277,15 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
         let viewController = navigationController.topViewController as! NCSelect
         
         viewController.delegate = self
-        viewController.hideButtonCreateFolder = false
+        viewController.typeOfCommandView = .select
         viewController.includeDirectoryE2EEncryption = true
         viewController.includeImages = false
-        viewController.selectFile = false
-        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
         viewController.type = ""
         
+//        viewController.hideButtonCreateFolder = false
+//        viewController.selectFile = false
+//        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
+
         navigationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
         self.present(navigationController, animated: true, completion: nil)
     }

+ 7 - 6
iOSClient/Main/NCFunctionCenter.swift

@@ -466,15 +466,16 @@ import NCCommunication
             guard let vc = viewController else { return }
 
             vc.delegate = self
-            vc.hideButtonCreateFolder = false
-            vc.selectFile = false
+            vc.typeOfCommandView = .copyMove
+//            vc.hideButtonCreateFolder = false
+//            vc.selectFile = false
             vc.includeDirectoryE2EEncryption = false
             vc.includeImages = false
             vc.type = ""
-            vc.titleButtonDone = NSLocalizedString("_move_", comment: "")
-            vc.titleButtonDone1 = NSLocalizedString("_copy_",comment: "")
-            vc.isButtonDone1Hide = false
-            vc.isOverwriteHide = false
+//            vc.titleButtonDone = NSLocalizedString("_move_", comment: "")
+//            vc.titleButtonDone1 = NSLocalizedString("_copy_",comment: "")
+//            vc.isButtonDone1Hide = false
+//            vc.isOverwriteHide = false
             vc.items = copyItems
             vc.serverUrl = serverUrl
             

+ 5 - 4
iOSClient/Menu/NCMedia+Menu.swift

@@ -80,14 +80,15 @@ extension NCMedia {
                         let viewController = navigationController.topViewController as! NCSelect
                         
                         viewController.delegate = self
-                        viewController.hideButtonCreateFolder = true
+                        viewController.typeOfCommandView = .select
                         viewController.includeDirectoryE2EEncryption = false
                         viewController.includeImages = false
-                        viewController.selectFile = false
-                        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
                         viewController.type = "mediaFolder"
+
+//                        viewController.hideButtonCreateFolder = true
+//                        viewController.selectFile = false
+//                        viewController.titleButtonDone = NSLocalizedString("_select_", comment: "")
                         
-                        navigationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
                         self.present(navigationController, animated: true, completion: nil)
                     }
                 )

+ 9 - 6
iOSClient/Menu/NCViewer+Menu.swift

@@ -200,16 +200,19 @@ extension NCViewer {
                         let viewController = navigationController.topViewController as! NCSelect
                         
                         viewController.delegate = NCViewer.shared
-                        viewController.hideButtonCreateFolder = false
+                        viewController.typeOfCommandView = .copyMove
+                        
+//                        viewController.hideButtonCreateFolder = false
+//                        viewController.titleButtonDone = NSLocalizedString("_move_", comment: "")
+//                        viewController.titleButtonDone1 = NSLocalizedString("_copy_", comment: "")
+//                        viewController.isButtonDone1Hide = false
+//                        viewController.isOverwriteHide = false
+                        
                         viewController.items = [metadata]
-                        viewController.selectFile = false
                         viewController.includeDirectoryE2EEncryption = false
                         viewController.includeImages = false
                         viewController.type = ""
-                        viewController.titleButtonDone = NSLocalizedString("_move_", comment: "")
-                        viewController.titleButtonDone1 = NSLocalizedString("_copy_", comment: "")
-                        viewController.isButtonDone1Hide = false
-                        viewController.isOverwriteHide = false
+                       
                         
                         navigationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
                         self.appDelegate.window?.rootViewController?.present(navigationController, animated: true, completion: nil)

+ 2 - 106
iOSClient/Select/NCSelect.storyboard

@@ -5,7 +5,6 @@
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -18,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="0.0" width="414" height="796"/>
+                                <rect key="frame" x="0.0" y="0.0" width="414" height="862"/>
                                 <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,103 +30,13 @@
                                     <outlet property="delegate" destination="VYq-xA-D35" id="EXB-bA-tje"/>
                                 </connections>
                             </collectionView>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="un8-Xf-9Fb">
-                                <rect key="frame" x="0.0" y="796" width="414" height="100"/>
-                                <subviews>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QFB-w0-4Kc">
-                                        <rect key="frame" x="15" y="50" width="120" height="30"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="30" id="E2W-Hd-QqN"/>
-                                            <constraint firstAttribute="width" constant="120" id="Nyx-sm-Sr7"/>
-                                        </constraints>
-                                        <state key="normal" title="Create folder"/>
-                                        <connections>
-                                            <action selector="actionCreateFolder:" destination="VYq-xA-D35" eventType="touchUpInside" id="1Ux-GA-UVs"/>
-                                        </connections>
-                                    </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gUK-Yw-aVP">
-                                        <rect key="frame" x="279" y="50" width="120" height="30"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="120" id="fDv-lp-fXV"/>
-                                            <constraint firstAttribute="height" constant="30" id="jeT-Z9-lQr"/>
-                                        </constraints>
-                                        <state key="normal" title="Done"/>
-                                        <connections>
-                                            <action selector="actionDone:" destination="VYq-xA-D35" eventType="touchUpInside" id="LJA-b3-BI4"/>
-                                        </connections>
-                                    </button>
-                                    <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kze-s7-kTI">
-                                        <rect key="frame" x="279" y="10" width="120" height="30"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="30" id="Hfn-8s-27i"/>
-                                            <constraint firstAttribute="width" constant="120" id="S9y-Wh-wjq"/>
-                                        </constraints>
-                                        <state key="normal" title="Done"/>
-                                        <connections>
-                                            <action selector="actionDone1:" destination="VYq-xA-D35" eventType="touchUpInside" id="pjY-Y0-8GF"/>
-                                        </connections>
-                                    </button>
-                                    <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bvU-cp-GX3">
-                                        <rect key="frame" x="15" y="10" width="150" height="31"/>
-                                        <subviews>
-                                            <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="obN-5M-keH">
-                                                <rect key="frame" x="0.0" y="0.0" width="51" height="31"/>
-                                                <connections>
-                                                    <action selector="valueChangedSwitchOverwrite:" destination="VYq-xA-D35" eventType="valueChanged" id="bYR-qG-s45"/>
-                                                </connections>
-                                            </switch>
-                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Overwrite" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SQc-p3-dhj">
-                                                <rect key="frame" x="57" y="7.6666666666666288" width="93" height="16"/>
-                                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                                                <nil key="textColor"/>
-                                                <nil key="highlightedColor"/>
-                                            </label>
-                                        </subviews>
-                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                        <constraints>
-                                            <constraint firstAttribute="bottom" secondItem="obN-5M-keH" secondAttribute="bottom" id="3Bo-bE-Bam"/>
-                                            <constraint firstAttribute="trailing" secondItem="SQc-p3-dhj" secondAttribute="trailing" id="7As-NH-dbc"/>
-                                            <constraint firstItem="SQc-p3-dhj" firstAttribute="leading" secondItem="obN-5M-keH" secondAttribute="trailing" constant="8" id="HZh-Zu-9q8"/>
-                                            <constraint firstItem="obN-5M-keH" firstAttribute="top" secondItem="bvU-cp-GX3" secondAttribute="top" id="VcD-tH-oXH"/>
-                                            <constraint firstAttribute="width" constant="150" id="at7-cc-TFB"/>
-                                            <constraint firstItem="obN-5M-keH" firstAttribute="leading" secondItem="bvU-cp-GX3" secondAttribute="leading" id="hVa-jE-whT"/>
-                                            <constraint firstItem="SQc-p3-dhj" firstAttribute="centerY" secondItem="obN-5M-keH" secondAttribute="centerY" id="spo-ml-JC2"/>
-                                        </constraints>
-                                    </view>
-                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3z3-MI-fRA">
-                                        <rect key="frame" x="0.0" y="0.0" width="414" height="1"/>
-                                        <color key="backgroundColor" red="0.59385012597152875" green="0.59385012597152875" blue="0.59385012597152875" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="1" id="zld-h9-vyx"/>
-                                        </constraints>
-                                    </view>
-                                </subviews>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                                <constraints>
-                                    <constraint firstAttribute="bottom" secondItem="gUK-Yw-aVP" secondAttribute="bottom" constant="20" id="0oU-sV-Pxt"/>
-                                    <constraint firstAttribute="trailing" secondItem="kze-s7-kTI" secondAttribute="trailing" constant="15" id="1PN-2z-evj"/>
-                                    <constraint firstItem="bvU-cp-GX3" firstAttribute="top" secondItem="un8-Xf-9Fb" secondAttribute="top" constant="10" id="2Ps-9o-kkP"/>
-                                    <constraint firstItem="3z3-MI-fRA" firstAttribute="top" secondItem="un8-Xf-9Fb" secondAttribute="top" id="2eC-xq-gtr"/>
-                                    <constraint firstItem="QFB-w0-4Kc" firstAttribute="leading" secondItem="un8-Xf-9Fb" secondAttribute="leading" constant="15" id="4ve-BO-5Xm"/>
-                                    <constraint firstItem="kze-s7-kTI" firstAttribute="top" secondItem="un8-Xf-9Fb" secondAttribute="top" constant="10" id="67e-lX-huM"/>
-                                    <constraint firstAttribute="bottom" secondItem="QFB-w0-4Kc" secondAttribute="bottom" constant="20" id="AQR-0q-coL"/>
-                                    <constraint firstItem="bvU-cp-GX3" firstAttribute="leading" secondItem="un8-Xf-9Fb" secondAttribute="leading" constant="15" id="BA5-HU-7IK"/>
-                                    <constraint firstAttribute="trailing" secondItem="gUK-Yw-aVP" secondAttribute="trailing" constant="15" id="OEt-Jd-Y4n"/>
-                                    <constraint firstAttribute="trailing" secondItem="3z3-MI-fRA" secondAttribute="trailing" id="dNi-0B-WD2"/>
-                                    <constraint firstItem="3z3-MI-fRA" firstAttribute="leading" secondItem="un8-Xf-9Fb" secondAttribute="leading" id="rO1-Sd-83g"/>
-                                </constraints>
-                            </view>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="vaA-85-uNN"/>
                         <constraints>
-                            <constraint firstItem="un8-Xf-9Fb" firstAttribute="top" secondItem="MaM-Im-7sc" secondAttribute="bottom" constant="-100" id="0IO-sX-tU0"/>
-                            <constraint firstItem="un8-Xf-9Fb" firstAttribute="leading" secondItem="vaA-85-uNN" secondAttribute="leading" id="4HX-cg-GTX"/>
                             <constraint firstItem="vaA-85-uNN" firstAttribute="trailing" secondItem="0HI-k1-SD0" secondAttribute="trailing" id="Dk4-c3-6wl"/>
                             <constraint firstItem="0HI-k1-SD0" firstAttribute="top" secondItem="MaM-Im-7sc" secondAttribute="top" id="GKj-QM-2Yy"/>
-                            <constraint firstItem="un8-Xf-9Fb" firstAttribute="top" secondItem="0HI-k1-SD0" secondAttribute="bottom" id="hau-oe-kdP"/>
+                            <constraint firstItem="vaA-85-uNN" firstAttribute="bottom" secondItem="0HI-k1-SD0" secondAttribute="bottom" id="onM-VP-itM"/>
                             <constraint firstItem="0HI-k1-SD0" firstAttribute="leading" secondItem="vaA-85-uNN" secondAttribute="leading" id="uLL-RT-YFO"/>
-                            <constraint firstAttribute="bottom" secondItem="un8-Xf-9Fb" secondAttribute="bottom" id="z19-GY-gfT"/>
-                            <constraint firstItem="vaA-85-uNN" firstAttribute="trailing" secondItem="un8-Xf-9Fb" secondAttribute="trailing" id="zJG-8i-AJ1"/>
                         </constraints>
                     </view>
                     <navigationItem key="navigationItem" id="N5K-De-4CP">
@@ -139,15 +48,7 @@
                     </navigationItem>
                     <connections>
                         <outlet property="buttonCancel" destination="qHj-AF-EN7" id="Fky-XJ-BxL"/>
-                        <outlet property="buttonCreateFolder" destination="QFB-w0-4Kc" id="QrT-ub-98u"/>
-                        <outlet property="buttonDone" destination="gUK-Yw-aVP" id="oNt-6m-aHh"/>
-                        <outlet property="buttonDone1" destination="kze-s7-kTI" id="XoG-Z1-Sc5"/>
                         <outlet property="collectionView" destination="0HI-k1-SD0" id="xme-mG-bnz"/>
-                        <outlet property="overwriteLabel" destination="SQc-p3-dhj" id="Hk3-6G-ZaD"/>
-                        <outlet property="overwriteSwitch" destination="obN-5M-keH" id="5LA-Lu-tto"/>
-                        <outlet property="overwriteView" destination="bvU-cp-GX3" id="Wh1-Xr-CSQ"/>
-                        <outlet property="separator" destination="3z3-MI-fRA" id="p7g-kT-lx9"/>
-                        <outlet property="toolbar" destination="un8-Xf-9Fb" id="RhD-n3-mlq"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="vH8-UY-9MN" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -173,9 +74,4 @@
             <point key="canvasLocation" x="256.80000000000001" y="228.93553223388307"/>
         </scene>
     </scenes>
-    <resources>
-        <systemColor name="systemBackgroundColor">
-            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-        </systemColor>
-    </resources>
 </document>

+ 74 - 25
iOSClient/Select/NCSelect.swift

@@ -31,31 +31,32 @@ import NCCommunication
 class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresentationControllerDelegate, NCListCellDelegate, NCGridCellDelegate, NCSectionHeaderMenuDelegate, NCEmptyDataSetDelegate {
     
     @IBOutlet fileprivate weak var collectionView: UICollectionView!
-    @IBOutlet fileprivate weak var toolbar: UIView!
-    @IBOutlet fileprivate weak var separator: UIView!
-    @IBOutlet fileprivate weak var overwriteView: UIView!
-
     @IBOutlet fileprivate weak var buttonCancel: UIBarButtonItem!
-    @IBOutlet fileprivate weak var buttonCreateFolder: UIButton!
-    @IBOutlet fileprivate weak var buttonDone: UIButton!
-    @IBOutlet fileprivate weak var buttonDone1: UIButton!
+   
+    private var selectCommandViewSelect: NCSelectCommandView?
     
-    @IBOutlet fileprivate weak var overwriteSwitch: UISwitch!
-    @IBOutlet fileprivate weak var overwriteLabel: UILabel!
+    @objc enum selectType: Int {
+        case select
+        case copyMove
+    }
     
     // ------ external settings ------------------------------------
     @objc var delegate: NCSelectDelegate?
+    @objc var typeOfCommandView: selectType = .select
     
-    @objc var hideButtonCreateFolder = false
-    @objc var selectFile = false
     @objc var includeDirectoryE2EEncryption = false
     @objc var includeImages = false
     @objc var type = ""
+    @objc var items: [Any] = []
+    
+    /*
+    @objc var selectFile = false
+    @objc var hideButtonCreateFolder = false
     @objc var titleButtonDone = NSLocalizedString("_move_", comment: "")
     @objc var titleButtonDone1 = NSLocalizedString("_copy_", comment: "")
     @objc var isButtonDone1Hide = true
     @objc var isOverwriteHide = true
-    @objc var items: [Any] = []
+    */
     
     var titleCurrentFolder = NCBrandOptions.shared.brand
     var serverUrl = ""
@@ -117,7 +118,6 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         
         // Footer
         collectionView.register(UINib.init(nibName: "NCSectionFooter", bundle: nil), forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: "sectionFooter")
-        
         collectionView.alwaysBounceVertical = true
         
         listLayout = NCListLayout()
@@ -131,7 +131,21 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         
         // Empty
         emptyDataSet = NCEmptyDataSet.init(view: collectionView, offset: 0, delegate: self)
-        
+
+        // Type of command view
+        if typeOfCommandView == .select {
+            selectCommandViewSelect = Bundle.main.loadNibNamed("NCSelectCommandViewSelect", owner: self, options: nil)?.first as? NCSelectCommandView
+            self.view.addSubview(selectCommandViewSelect!)
+            selectCommandViewSelect?.selectView = self
+            selectCommandViewSelect?.translatesAutoresizingMaskIntoConstraints = false
+        
+            selectCommandViewSelect?.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: 0).isActive = true
+            selectCommandViewSelect?.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0).isActive = true
+            selectCommandViewSelect?.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0).isActive = true
+            selectCommandViewSelect?.heightAnchor.constraint(equalToConstant: 80).isActive = true
+        }
+                
+        /*
         // title button
         buttonCancel.title = NSLocalizedString("_cancel_", comment: "")
         buttonCreateFolder.setTitle(NSLocalizedString("_create_folder_", comment: ""), for: .normal)
@@ -152,7 +166,8 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         buttonDone1.layer.masksToBounds = true
         buttonDone1.layer.backgroundColor = NCBrandColor.shared.graySoft.withAlphaComponent(0.5).cgColor
         buttonDone1.setTitleColor(.black, for: .normal)
-                
+        */
+        
         NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(reloadDataSource), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterReloadDataSource), object: nil)
 
@@ -164,6 +179,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         
         self.navigationItem.title = titleCurrentFolder
         
+        /*
         buttonDone.setTitle(titleButtonDone, for: .normal)
         buttonDone1.setTitle(titleButtonDone1, for: .normal)
         buttonDone1.isHidden = isButtonDone1Hide
@@ -177,6 +193,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         if hideButtonCreateFolder {
             buttonCreateFolder.isHidden = true
         }
+        */
         
         // set the serverUrl
         if serverUrl == "" {
@@ -210,7 +227,13 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
     }
     
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
-        super.traitCollectionDidChange(previousTraitCollection)        
+        super.traitCollectionDidChange(previousTraitCollection)
+        
+        if traitCollection.userInterfaceStyle == .dark {
+            
+        } else {
+            
+        }
     }
     
     @objc func changeTheming() {
@@ -218,8 +241,8 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         collectionView.backgroundColor = NCBrandColor.shared.backgroundView
         collectionView.reloadData()
         refreshControl.backgroundColor = NCBrandColor.shared.backgroundView
-        toolbar.backgroundColor = NCBrandColor.shared.tabBar
-        separator.backgroundColor = NCBrandColor.shared.graySoft
+        //toolbar.backgroundColor = NCBrandColor.shared.tabBar
+        //separator.backgroundColor = NCBrandColor.shared.graySoft
     }
     
     func presentationControllerDidDismiss( _ presentationController: UIPresentationController) {
@@ -262,6 +285,10 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         self.dismiss(animated: true, completion: nil)
     }
     
+    func selectButtonPressed(_ sender: UIButton) {
+        
+    }
+    
     @IBAction func actionCreateFolder(_ sender: Any) {
         
         let alertController = UIAlertController(title: NSLocalizedString("_create_folder_", comment: ""), message:"", preferredStyle: .alert)
@@ -290,7 +317,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         if let viewControllers = self.navigationController?.viewControllers {
             for viewController in viewControllers {
                 if viewController is NCSelect {
-                    (viewController as! NCSelect).overwrite = overwriteSwitch.isOn
+                    //(viewController as! NCSelect).overwrite = overwriteSwitch.isOn
                 }
             }
         }
@@ -382,15 +409,10 @@ extension NCSelect: UICollectionViewDelegate {
             self.metadataTouch = metadata
             
             visualController.delegate = delegate
-            visualController.hideButtonCreateFolder = hideButtonCreateFolder
-            visualController.selectFile = selectFile
+            visualController.typeOfCommandView = typeOfCommandView
             visualController.includeDirectoryE2EEncryption = includeDirectoryE2EEncryption
             visualController.includeImages = includeImages
             visualController.type = type
-            visualController.titleButtonDone = titleButtonDone
-            visualController.titleButtonDone1 = titleButtonDone1
-            visualController.isButtonDone1Hide = isButtonDone1Hide
-            visualController.isOverwriteHide = isOverwriteHide
             visualController.overwrite = overwrite
             visualController.items = items
 
@@ -793,3 +815,30 @@ extension NCSelect {
         }
     }
 }
+
+
+class NCSelectCommandView: UIView {
+
+    @IBOutlet weak var separatorView: UIView!
+    @IBOutlet weak var selectButton: UIButton!
+    @IBOutlet weak var separatorHeightConstraint: NSLayoutConstraint!
+
+    var selectView: NCSelect?
+    private let gradient: CAGradientLayer = CAGradientLayer()
+    
+    override func awakeFromNib() {
+        
+        separatorHeightConstraint.constant = 0.5
+        separatorView.backgroundColor = NCBrandColor.shared.separator
+        
+        selectButton.layer.cornerRadius = 15
+        selectButton.layer.masksToBounds = true
+        selectButton.layer.backgroundColor = NCBrandColor.shared.graySoft.withAlphaComponent(0.5).cgColor
+        selectButton.setTitleColor(.black, for: .normal)
+        selectButton.setTitle(NSLocalizedString("_select_", comment: ""), for: .normal)
+    }
+    
+    @IBAction func selectButtonPressed(_ sender: UIButton) {
+        selectView?.selectButtonPressed(sender)
+    }
+}

+ 62 - 0
iOSClient/Select/NCSelectCommandViewSelect.xib

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina3_5" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="NCSelectCommandView" customModule="Nextcloud" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hnf-K7-plh">
+                    <rect key="frame" x="100" y="225" width="120" height="30"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="120" id="hNM-l8-5EZ"/>
+                        <constraint firstAttribute="height" constant="30" id="u76-eq-MhY"/>
+                    </constraints>
+                    <state key="normal" title="Button"/>
+                    <connections>
+                        <action selector="selectButtonPressed:" destination="iN0-l3-epB" eventType="touchUpInside" id="Sv5-p0-quT"/>
+                    </connections>
+                </button>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xmS-E7-44n">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
+                    <color key="backgroundColor" systemColor="opaqueSeparatorColor"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="1" id="HLl-PW-5av"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+            <constraints>
+                <constraint firstItem="Hnf-K7-plh" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="Ar1-CY-imR"/>
+                <constraint firstItem="xmS-E7-44n" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="CiY-20-2Gk"/>
+                <constraint firstItem="xmS-E7-44n" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="IWq-yN-wAO"/>
+                <constraint firstItem="Hnf-K7-plh" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="lf3-1a-P6a"/>
+                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="xmS-E7-44n" secondAttribute="trailing" id="sg2-b1-tqE"/>
+            </constraints>
+            <connections>
+                <outlet property="selectButton" destination="Hnf-K7-plh" id="hTj-bA-h3I"/>
+                <outlet property="separatorHeightConstraint" destination="HLl-PW-5av" id="Zjf-UY-YAw"/>
+                <outlet property="separatorView" destination="xmS-E7-44n" id="9YB-B1-j8j"/>
+            </connections>
+            <point key="canvasLocation" x="-249" y="153"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="opaqueSeparatorColor">
+            <color red="0.77647058823529413" green="0.77647058823529413" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+        </systemColor>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 4 - 3
iOSClient/Settings/CCManageAutoUpload.m

@@ -513,12 +513,13 @@
      NCSelect *viewController = (NCSelect *)navigationController.topViewController;
      
      viewController.delegate = self;
-     viewController.hideButtonCreateFolder = false;
-     viewController.selectFile = false;
+     viewController.typeOfCommandView = 0;
      viewController.includeDirectoryE2EEncryption = false;
      viewController.includeImages = false;
      viewController.type = @"";
-     viewController.titleButtonDone = NSLocalizedString(@"_select_", nil);
+//     viewController.hideButtonCreateFolder = false;
+//     viewController.selectFile = false;
+//     viewController.titleButtonDone = NSLocalizedString(@"_select_", nil);
      
      [navigationController setModalPresentationStyle:UIModalPresentationFullScreen];
      [self presentViewController:navigationController animated:YES completion:^{

+ 2 - 2
iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift

@@ -155,8 +155,8 @@ class NCViewerRichdocument: UIViewController, WKNavigationDelegate, WKScriptMess
                 let viewController = navigationController.topViewController as! NCSelect
                 
                 viewController.delegate = self
-                viewController.hideButtonCreateFolder = true
-                viewController.selectFile = true
+//                viewController.hideButtonCreateFolder = true
+//                viewController.selectFile = true
                 viewController.includeDirectoryE2EEncryption = false
                 viewController.includeImages = true
                 viewController.type = ""