Marino Faggiana 6 rokov pred
rodič
commit
d9237c2a1d

+ 1 - 0
iOSClient/Brand/NCBrand.swift

@@ -46,6 +46,7 @@ class NCBrandColor: NSObject {
     @objc public var tabBar:                UIColor = .white
     @objc public let nextcloud:             UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
     @objc public let icon:                  UIColor = UIColor(red: 104.0/255.0, green: 104.0/255.0, blue: 104.0/255.0, alpha: 1.0)
+    @objc public let optionItem:            UIColor = UIColor(red: 178.0/255.0, green: 178.0/255.0, blue: 178.0/255.0, alpha: 1.0)
     @objc public let graySoft:              UIColor = UIColor(red: 162.0/255.0, green: 162.0/255.0, blue: 162.0/255.0, alpha: 0.5)
     @objc public let yellowFavorite:        UIColor = UIColor(red: 248.0/255.0, green: 205.0/255.0, blue: 70.0/255.0, alpha: 1.0)
 

BIN
iOSClient/Images.xcassets/restore.imageset/restore.png


BIN
iOSClient/Images.xcassets/restore.imageset/restore@2x.png


BIN
iOSClient/Images.xcassets/restore.imageset/restore@3x.png


+ 1 - 3
iOSClient/Images.xcassets/restore.imageset/Contents.json → iOSClient/Images.xcassets/trashMore.imageset/Contents.json

@@ -2,17 +2,15 @@
   "images" : [
     {
       "idiom" : "universal",
-      "filename" : "restore.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "restore@2x.png",
+      "filename" : "trashMore@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "filename" : "restore@3x.png",
       "scale" : "3x"
     }
   ],

BIN
iOSClient/Images.xcassets/trashMore.imageset/trashMore@2x.png


+ 21 - 0
iOSClient/Images.xcassets/trashRestore.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "trashRestore@2.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
iOSClient/Images.xcassets/trashRestore.imageset/trashRestore@2.png


+ 2 - 2
iOSClient/Main/CCMore.swift

@@ -123,7 +123,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
             functionMenu.append(item)
         }
         
-#if targetEnvironment(simulator)
+//#if targetEnvironment(simulator)
         // ITEM : Trash
         let capabilities = NCManageDatabase.sharedInstance.getCapabilites()
         if capabilities != nil && capabilities!.versionMajor >= Int(k_trash_version_available) {
@@ -134,7 +134,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
             item.url = "segueTrash"
             functionMenu.append(item)
         }
-#endif
+//#endif
         
         // ITEM : External
         if NCBrandOptions.sharedInstance.disable_more_external_site == false {

+ 2 - 7
iOSClient/Trash/NCTrash.swift

@@ -63,11 +63,11 @@ class NCTrash: UIViewController , UICollectionViewDataSource, UICollectionViewDe
     
     // MARK: tap cell
     func tapRestoreDelegate(with fileID: String) {
-        
+        print("touch restore")
     }
     
     func tapMoreDelegate(with fileID: String) {
-        
+        print("touch more")
     }
     
     // MARK: collectionView methods
@@ -156,9 +156,4 @@ class ListLayout: UICollectionViewFlowLayout {
             super.itemSize = newValue
         }
     }
-    
-    override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint) -> CGPoint {
-        return proposedContentOffset
-    }
-    
 }

+ 15 - 9
iOSClient/Trash/NCTrashListCell.swift

@@ -11,11 +11,17 @@ import UIKit
 
 class NCTrashListCell: UICollectionViewCell {
     
-    @IBOutlet weak var imageView: UIImageView!
+    @IBOutlet weak var imageItem: UIImageView!
+    
     @IBOutlet weak var labelTitle: UILabel!
     @IBOutlet weak var labelInfo: UILabel!
+    
     @IBOutlet weak var restore: UIImageView!
+    @IBOutlet weak var tapRestore: UIImageView!
+
     @IBOutlet weak var more: UIImageView!
+    @IBOutlet weak var tapMore: UIImageView!
+
     @IBOutlet weak var separator: UIView!
 
     
@@ -26,30 +32,30 @@ class NCTrashListCell: UICollectionViewCell {
     override func awakeFromNib() {
         super.awakeFromNib()
        
-        restore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "restore"), multiplier: 2, color: NCBrandColor.sharedInstance.icon)
-        more.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), multiplier: 2, color: NCBrandColor.sharedInstance.icon)
+        restore.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trashRestore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
+        more.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trashMore"), multiplier: 2, color: NCBrandColor.sharedInstance.optionItem)
         separator.backgroundColor = NCBrandColor.sharedInstance.seperator
         
         let tapGestureRestore = UITapGestureRecognizer(target: self, action: #selector(NCTrashListCell.tapRestore(sender:)))
         addGestureRecognizer(tapGestureRestore)
         tapGestureRestore.numberOfTapsRequired = 1
-        restore.isUserInteractionEnabled = true
-        restore.addGestureRecognizer(tapGestureRestore)
+        tapRestore.isUserInteractionEnabled = true
+        tapRestore.addGestureRecognizer(tapGestureRestore)
         
         let tapGestureMore = UITapGestureRecognizer(target: self, action: #selector(NCTrashListCell.tapMore(sender:)))
         addGestureRecognizer(tapGestureMore)
         tapGestureMore.numberOfTapsRequired = 1
-        more.isUserInteractionEnabled = true
-        more.addGestureRecognizer(tapGestureMore)
+        tapMore.isUserInteractionEnabled = true
+        tapMore.addGestureRecognizer(tapGestureMore)
     }
     
     public func configure(with fileID: String, image: UIImage?, title: String, info: String) {
 
         self.fileID = fileID
 
-        imageView.image = image
+        imageItem.image = image
         labelTitle.text = title
-        labelInfo.text = info        
+        labelInfo.text = info
     }
     
     @objc func tapRestore(sender: UITapGestureRecognizer) {

+ 38 - 18
iOSClient/Trash/NCTrashListCell.xib

@@ -19,7 +19,7 @@
                 <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="w2m-Vw-hpd">
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="w2m-Vw-hpd" userLabel="ImageItem">
                         <rect key="frame" x="5" y="10" width="40" height="40"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="40" id="Dpd-Xj-z4U"/>
@@ -27,29 +27,36 @@
                         </constraints>
                     </imageView>
                     <label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UtT-L6-mgW" userLabel="Label Title">
-                        <rect key="frame" x="55" y="13" width="435" height="18"/>
+                        <rect key="frame" x="55" y="13" width="417" height="18"/>
                         <fontDescription key="fontDescription" type="system" pointSize="15"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" tag="102" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AXX-71-9Q6" userLabel="Label Info File">
-                        <rect key="frame" x="55" y="31" width="435" height="15"/>
+                        <rect key="frame" x="55" y="31" width="417" height="15"/>
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nwZ-pi-Igj" userLabel="restore">
-                        <rect key="frame" x="500" y="5" width="50" height="50"/>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="d22-W3-pnz" userLabel="tapMore">
+                        <rect key="frame" x="540" y="0.0" width="60" height="60"/>
                         <constraints>
-                            <constraint firstAttribute="width" constant="50" id="5Zc-h7-ZRJ"/>
-                            <constraint firstAttribute="height" constant="50" id="xvo-pN-hfE"/>
+                            <constraint firstAttribute="height" constant="60" id="0DY-32-6ZD"/>
+                            <constraint firstAttribute="width" constant="60" id="0aK-fH-Yu4"/>
                         </constraints>
                     </imageView>
-                    <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dgL-g5-Nkc" userLabel="More">
-                        <rect key="frame" x="550" y="5" width="50" height="50"/>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dgL-g5-Nkc" userLabel="More">
+                        <rect key="frame" x="557.5" y="17.5" width="25" height="25"/>
                         <constraints>
-                            <constraint firstAttribute="width" constant="50" id="05P-NL-pd8"/>
-                            <constraint firstAttribute="height" constant="50" id="Jet-eo-x1M"/>
+                            <constraint firstAttribute="width" constant="25" id="05P-NL-pd8"/>
+                            <constraint firstAttribute="height" constant="25" id="Jet-eo-x1M"/>
+                        </constraints>
+                    </imageView>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nwZ-pi-Igj" userLabel="restore">
+                        <rect key="frame" x="497.5" y="17.5" width="25" height="25"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="25" id="5Zc-h7-ZRJ"/>
+                            <constraint firstAttribute="height" constant="25" id="xvo-pN-hfE"/>
                         </constraints>
                     </imageView>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Egg-cb-EhZ" userLabel="Separator">
@@ -60,34 +67,47 @@
                             <constraint firstAttribute="height" constant="1" id="G5S-67-boG"/>
                         </constraints>
                     </view>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="qR4-Xj-bmo" userLabel="tapRestore">
+                        <rect key="frame" x="480" y="0.0" width="60" height="60"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="60" id="1PC-Az-sTW"/>
+                            <constraint firstAttribute="width" constant="60" id="9V3-4O-QtD"/>
+                        </constraints>
+                    </imageView>
                 </subviews>
             </view>
             <constraints>
+                <constraint firstItem="nwZ-pi-Igj" firstAttribute="centerY" secondItem="qR4-Xj-bmo" secondAttribute="centerY" id="2kA-Bs-F1L"/>
+                <constraint firstItem="qR4-Xj-bmo" firstAttribute="leading" secondItem="AXX-71-9Q6" secondAttribute="trailing" constant="8" id="5Bg-iG-g1D"/>
+                <constraint firstItem="dgL-g5-Nkc" firstAttribute="centerX" secondItem="d22-W3-pnz" secondAttribute="centerX" id="7ir-57-5fQ"/>
                 <constraint firstItem="Gu8-oz-zWa" firstAttribute="bottom" secondItem="Egg-cb-EhZ" secondAttribute="bottom" id="81D-sw-EaX"/>
-                <constraint firstItem="dgL-g5-Nkc" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="8S3-NI-RXu"/>
-                <constraint firstItem="nwZ-pi-Igj" firstAttribute="leading" secondItem="AXX-71-9Q6" secondAttribute="trailing" constant="10" id="9oy-QL-WsN"/>
-                <constraint firstItem="dgL-g5-Nkc" firstAttribute="leading" secondItem="nwZ-pi-Igj" secondAttribute="trailing" id="GW0-RK-slT"/>
-                <constraint firstItem="nwZ-pi-Igj" firstAttribute="leading" secondItem="UtT-L6-mgW" secondAttribute="trailing" constant="10" id="Hhf-7M-29G"/>
+                <constraint firstItem="nwZ-pi-Igj" firstAttribute="centerX" secondItem="qR4-Xj-bmo" secondAttribute="centerX" id="Ayt-Rm-giN"/>
+                <constraint firstItem="dgL-g5-Nkc" firstAttribute="centerY" secondItem="d22-W3-pnz" secondAttribute="centerY" id="F7Q-Co-oIr"/>
                 <constraint firstItem="Egg-cb-EhZ" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" id="JCm-UU-Pxu"/>
+                <constraint firstItem="qR4-Xj-bmo" firstAttribute="leading" secondItem="UtT-L6-mgW" secondAttribute="trailing" constant="8" id="NUN-8y-Sux"/>
                 <constraint firstItem="UtT-L6-mgW" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" constant="10" id="PQ8-0b-fLa"/>
-                <constraint firstItem="nwZ-pi-Igj" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="QNH-El-hoW"/>
                 <constraint firstItem="AXX-71-9Q6" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" constant="10" id="Qvq-r5-AX9"/>
+                <constraint firstItem="d22-W3-pnz" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="Spf-sY-iBZ"/>
                 <constraint firstItem="Gu8-oz-zWa" firstAttribute="bottom" secondItem="AXX-71-9Q6" secondAttribute="bottom" constant="14" id="d06-sn-I3Y"/>
-                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="dgL-g5-Nkc" secondAttribute="trailing" id="fFe-pj-Yzy"/>
+                <constraint firstItem="qR4-Xj-bmo" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="hMm-kr-vzh"/>
                 <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="Egg-cb-EhZ" secondAttribute="trailing" id="k8f-bU-D6I"/>
                 <constraint firstItem="w2m-Vw-hpd" firstAttribute="leading" secondItem="Gu8-oz-zWa" secondAttribute="leading" constant="5" id="mBb-ff-7HD"/>
                 <constraint firstItem="UtT-L6-mgW" firstAttribute="top" secondItem="Gu8-oz-zWa" secondAttribute="top" constant="13" id="nrY-2F-QZ2"/>
+                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="d22-W3-pnz" secondAttribute="trailing" id="oje-Cb-lK2"/>
                 <constraint firstItem="w2m-Vw-hpd" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="qKl-4Y-m5t"/>
+                <constraint firstItem="d22-W3-pnz" firstAttribute="leading" secondItem="qR4-Xj-bmo" secondAttribute="trailing" id="xXk-xM-gSc"/>
             </constraints>
             <viewLayoutGuide key="safeArea" id="Gu8-oz-zWa"/>
             <size key="customSize" width="650" height="58"/>
             <connections>
-                <outlet property="imageView" destination="w2m-Vw-hpd" id="3ZB-Tc-gqI"/>
+                <outlet property="imageItem" destination="w2m-Vw-hpd" id="iY5-ed-crD"/>
                 <outlet property="labelInfo" destination="AXX-71-9Q6" id="krb-tZ-UQ7"/>
                 <outlet property="labelTitle" destination="UtT-L6-mgW" id="Xv6-zM-2v1"/>
                 <outlet property="more" destination="dgL-g5-Nkc" id="FOg-ZX-Yti"/>
                 <outlet property="restore" destination="nwZ-pi-Igj" id="CHB-Fl-yAZ"/>
                 <outlet property="separator" destination="Egg-cb-EhZ" id="uhq-Nc-z8K"/>
+                <outlet property="tapMore" destination="d22-W3-pnz" id="6tZ-rQ-i8S"/>
+                <outlet property="tapRestore" destination="qR4-Xj-bmo" id="M4Q-YB-fuh"/>
             </connections>
             <point key="canvasLocation" x="97.599999999999994" y="129.53523238380811"/>
         </collectionViewCell>