marinofaggiana 5 years ago
parent
commit
afbb731e8a

+ 10 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadConflict.swift

@@ -54,6 +54,7 @@ import Foundation
         
         tableView.dataSource = self
         tableView.delegate = self
+        tableView.tableFooterView = UIView()
         
         tableView.register(UINib.init(nibName: "NCCreateFormUploadConflictCell", bundle: nil), forCellReuseIdentifier: "Cell")
         
@@ -62,11 +63,14 @@ import Foundation
         labelNewFiles.text = NSLocalizedString("_file_conflict_new_", comment: "")
         labelAlreadyExistingFiles.text = NSLocalizedString("_file_conflict_exists_", comment: "")
         
-        buttonCancel.layer.cornerRadius = 15
+        switchNewFiles.isOn = false
+        switchAlreadyExistingFiles.isOn = false
+        
+        buttonCancel.layer.cornerRadius = 20
         buttonCancel.layer.masksToBounds = true
         buttonCancel.setTitle(NSLocalizedString("_cancel_", comment: ""), for: .normal)
         
-        buttonContinue.layer.cornerRadius = 15
+        buttonContinue.layer.cornerRadius = 20
         buttonContinue.layer.masksToBounds = true
         buttonContinue.setTitle(NSLocalizedString("_continue_", comment: ""), for: .normal)
         buttonContinue.isEnabled = false
@@ -78,7 +82,7 @@ import Foundation
 extension NCCreateFormUploadConflict: UITableViewDelegate {
     
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-        return 120
+        return 125
     }
 }
 
@@ -113,6 +117,9 @@ extension NCCreateFormUploadConflict: UITableViewDataSource {
             }
             
             cell.labelFileName.text = metadata.fileNameView
+            cell.labelDetail.text = CCUtility.dateDiff(metadata.date as Date) + ", " + CCUtility.transformedSize(metadata.size)
+            cell.switchNewFile.isOn = false
+            cell.switchAlreadyExistingFile.isOn = false
             
             return cell
         }

+ 23 - 23
iOSClient/Main/Create cloud/NCCreateFormUploadConflictCell.xib

@@ -9,52 +9,52 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="118" id="eGO-5i-ez1" customClass="NCCreateFormUploadConflictCell" customModule="Nextcloud" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="539" height="117"/>
+        <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="125" id="eGO-5i-ez1" customClass="NCCreateFormUploadConflictCell" customModule="Nextcloud" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="641" height="125"/>
             <autoresizingMask key="autoresizingMask"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="eGO-5i-ez1" id="y6Q-vz-Xda">
-                <rect key="frame" x="0.0" y="0.0" width="539" height="117"/>
+                <rect key="frame" x="0.0" y="0.0" width="641" height="125"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="WSQ-HI-Wkg">
-                        <rect key="frame" x="5" y="5" width="50" height="50"/>
+                        <rect key="frame" x="5" y="28" width="50" height="50"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="50" id="cfG-23-jOI"/>
                             <constraint firstAttribute="height" constant="50" id="hzO-CU-dTl"/>
                         </constraints>
                     </imageView>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hv8-qJ-lkR">
-                        <rect key="frame" x="63" y="5" width="471" height="21"/>
-                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                        <nil key="textColor"/>
-                        <nil key="highlightedColor"/>
-                    </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0hq-re-YVn">
-                        <rect key="frame" x="63" y="36" width="471" height="21"/>
-                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <rect key="frame" x="5" y="5" width="626" height="18"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
                         <nil key="textColor"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FUL-4V-OgL">
-                        <rect key="frame" x="5" y="75" width="51" height="31"/>
+                        <rect key="frame" x="5" y="88" width="51" height="31"/>
                     </switch>
                     <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jBi-8r-tc5">
-                        <rect key="frame" x="485" y="75" width="51" height="31"/>
+                        <rect key="frame" x="587" y="88" width="51" height="31"/>
                     </switch>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0hq-re-YVn">
+                        <rect key="frame" x="65" y="28" width="571" height="21"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="Hv8-qJ-lkR" firstAttribute="leading" secondItem="WSQ-HI-Wkg" secondAttribute="trailing" constant="8" id="1jg-OV-Uy4"/>
+                    <constraint firstItem="0hq-re-YVn" firstAttribute="top" secondItem="WSQ-HI-Wkg" secondAttribute="top" id="1pe-uw-16c"/>
+                    <constraint firstItem="Hv8-qJ-lkR" firstAttribute="top" secondItem="y6Q-vz-Xda" secondAttribute="top" constant="5" id="2QQ-S7-55R"/>
                     <constraint firstItem="WSQ-HI-Wkg" firstAttribute="leading" secondItem="y6Q-vz-Xda" secondAttribute="leading" constant="5" id="2lG-h5-UAz"/>
                     <constraint firstItem="FUL-4V-OgL" firstAttribute="leading" secondItem="y6Q-vz-Xda" secondAttribute="leading" constant="5" id="7rL-L6-lPT"/>
-                    <constraint firstItem="0hq-re-YVn" firstAttribute="leading" secondItem="WSQ-HI-Wkg" secondAttribute="trailing" constant="8" id="DtR-am-9J1"/>
-                    <constraint firstItem="0hq-re-YVn" firstAttribute="top" secondItem="Hv8-qJ-lkR" secondAttribute="bottom" constant="10" id="QuN-sJ-Hb0"/>
-                    <constraint firstItem="WSQ-HI-Wkg" firstAttribute="top" secondItem="y6Q-vz-Xda" secondAttribute="top" constant="5" id="TCY-Jz-66h"/>
+                    <constraint firstAttribute="trailing" secondItem="0hq-re-YVn" secondAttribute="trailing" constant="5" id="7zg-tI-gc0"/>
+                    <constraint firstItem="WSQ-HI-Wkg" firstAttribute="top" secondItem="Hv8-qJ-lkR" secondAttribute="bottom" constant="5" id="Eo7-0B-Hjr"/>
+                    <constraint firstItem="Hv8-qJ-lkR" firstAttribute="leading" secondItem="y6Q-vz-Xda" secondAttribute="leading" constant="5" id="JVe-dZ-Lqh"/>
                     <constraint firstAttribute="trailing" secondItem="jBi-8r-tc5" secondAttribute="trailing" constant="5" id="Vv4-gx-2nv"/>
-                    <constraint firstAttribute="trailing" secondItem="0hq-re-YVn" secondAttribute="trailing" constant="5" id="bsY-9d-e86"/>
-                    <constraint firstAttribute="trailing" secondItem="Hv8-qJ-lkR" secondAttribute="trailing" constant="5" id="m8P-xo-tVw"/>
+                    <constraint firstItem="0hq-re-YVn" firstAttribute="leading" secondItem="WSQ-HI-Wkg" secondAttribute="trailing" constant="10" id="fuT-Bu-IRa"/>
+                    <constraint firstAttribute="trailing" secondItem="Hv8-qJ-lkR" secondAttribute="trailing" constant="10" id="jEF-pw-ZsK"/>
                     <constraint firstItem="jBi-8r-tc5" firstAttribute="centerY" secondItem="FUL-4V-OgL" secondAttribute="centerY" id="oZZ-e1-nuY"/>
-                    <constraint firstItem="Hv8-qJ-lkR" firstAttribute="top" secondItem="y6Q-vz-Xda" secondAttribute="top" constant="5" id="pQB-CS-S9M"/>
-                    <constraint firstItem="FUL-4V-OgL" firstAttribute="top" secondItem="WSQ-HI-Wkg" secondAttribute="bottom" constant="20" id="vRX-yS-O3v"/>
+                    <constraint firstItem="FUL-4V-OgL" firstAttribute="top" secondItem="WSQ-HI-Wkg" secondAttribute="bottom" constant="10" id="vRX-yS-O3v"/>
                 </constraints>
             </tableViewCellContentView>
             <connections>
@@ -64,7 +64,7 @@
                 <outlet property="switchAlreadyExistingFile" destination="jBi-8r-tc5" id="L0M-zb-k6v"/>
                 <outlet property="switchNewFile" destination="FUL-4V-OgL" id="jhA-7N-hqA"/>
             </connections>
-            <point key="canvasLocation" x="99.275362318840592" y="21.09375"/>
+            <point key="canvasLocation" x="173.18840579710147" y="23.772321428571427"/>
         </tableViewCell>
     </objects>
 </document>