marinofaggiana 4 years ago
parent
commit
b3813835fd

+ 45 - 45
iOSClient/Main/Colleaction Common/NCCollectionCommon.swift

@@ -34,63 +34,63 @@ class NCCollectionCommon: NSObject, NCSelectDelegate {
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
 
     struct images {
-        static var cellFileImage = UIImage()
+        static var file = UIImage()
 
-        static var cellSharedImage = UIImage()
-        static var cellCanShareImage = UIImage()
-        static var cellShareByLinkImage = UIImage()
-        
-        static var cellFavouriteImage = UIImage()
-        static var cellCommentImage = UIImage()
-        static var cellLivePhotoImage = UIImage()
-        static var cellOfflineFlag = UIImage()
-        static var cellLocal = UIImage()
+        static var shared = UIImage()
+        static var canShare = UIImage()
+        static var shareByLink = UIImage()
+        
+        static var favorite = UIImage()
+        static var comment = UIImage()
+        static var livePhoto = UIImage()
+        static var offlineFlag = UIImage()
+        static var local = UIImage()
 
-        static var cellFolderEncryptedImage = UIImage()
-        static var cellFolderSharedWithMeImage = UIImage()
-        static var cellFolderPublicImage = UIImage()
-        static var cellFolderGroupImage = UIImage()
-        static var cellFolderExternalImage = UIImage()
-        static var cellFolderAutomaticUploadImage = UIImage()
-        static var cellFolderImage = UIImage()
-        
-        static var cellCheckedYes = UIImage()
-        static var cellCheckedNo = UIImage()
-        
-        static var cellButtonMore = UIImage()
-        static var cellButtonStop = UIImage()
+        static var folderEncrypted = UIImage()
+        static var folderSharedWithMe = UIImage()
+        static var folderPublic = UIImage()
+        static var folderGroup = UIImage()
+        static var folderExternal = UIImage()
+        static var folderAutomaticUpload = UIImage()
+        static var folder = UIImage()
+        
+        static var checkedYes = UIImage()
+        static var checkedNo = UIImage()
+        
+        static var buttonMore = UIImage()
+        static var buttonStop = UIImage()
     }
     
     // MARK: -
     
     @objc func createImagesThemingColor() {
         
-        images.cellFileImage = UIImage.init(named: "file")!
+        images.file = UIImage.init(named: "file")!
         
-        images.cellSharedImage = UIImage(named: "share")!.image(color: NCBrandColor.shared.graySoft, size: 50)
-        images.cellCanShareImage = UIImage(named: "share")!.image(color: NCBrandColor.shared.graySoft, size: 50)
-        images.cellShareByLinkImage = UIImage(named: "sharebylink")!.image(color: NCBrandColor.shared.graySoft, size: 50)
+        images.shared = UIImage(named: "share")!.image(color: NCBrandColor.shared.graySoft, size: 50)
+        images.canShare = UIImage(named: "share")!.image(color: NCBrandColor.shared.graySoft, size: 50)
+        images.shareByLink = UIImage(named: "sharebylink")!.image(color: NCBrandColor.shared.graySoft, size: 50)
         
-        images.cellFavouriteImage = UIImage(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 50)
-        images.cellCommentImage = UIImage(named: "comment")!.image(color: NCBrandColor.shared.graySoft, size: 50)
-        images.cellLivePhotoImage = UIImage(named: "livePhoto")!.image(color: NCBrandColor.shared.textView, size: 50)
-        images.cellOfflineFlag = UIImage.init(named: "offlineFlag")!
-        images.cellLocal = UIImage.init(named: "local")!
+        images.favorite = UIImage(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 50)
+        images.comment = UIImage(named: "comment")!.image(color: NCBrandColor.shared.graySoft, size: 50)
+        images.livePhoto = UIImage(named: "livePhoto")!.image(color: NCBrandColor.shared.textView, size: 50)
+        images.offlineFlag = UIImage.init(named: "offlineFlag")!
+        images.local = UIImage.init(named: "local")!
             
         let folderWidth: CGFloat = UIScreen.main.bounds.width / 3
-        images.cellFolderEncryptedImage = UIImage(named: "folderEncrypted")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
-        images.cellFolderSharedWithMeImage = UIImage(named: "folder_shared_with_me")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
-        images.cellFolderPublicImage = UIImage(named: "folder_public")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
-        images.cellFolderGroupImage = UIImage(named: "folder_group")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
-        images.cellFolderExternalImage = UIImage(named: "folder_external")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
-        images.cellFolderAutomaticUploadImage = UIImage(named: "folderAutomaticUpload")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
-        images.cellFolderImage =  UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
-        
-        images.cellCheckedYes = UIImage(named: "checkedYes")!.image(color: .darkGray, size: 50)
-        images.cellCheckedNo = UIImage(named: "checkedNo")!.image(color: NCBrandColor.shared.graySoft, size: 50)
-        
-        images.cellButtonMore = UIImage(named: "more")!.image(color: NCBrandColor.shared.graySoft, size: 50)
-        images.cellButtonStop = UIImage(named: "stop")!.image(color: NCBrandColor.shared.graySoft, size: 50)
+        images.folderEncrypted = UIImage(named: "folderEncrypted")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
+        images.folderSharedWithMe = UIImage(named: "folder_shared_with_me")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
+        images.folderPublic = UIImage(named: "folder_public")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
+        images.folderGroup = UIImage(named: "folder_group")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
+        images.folderExternal = UIImage(named: "folder_external")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
+        images.folderAutomaticUpload = UIImage(named: "folderAutomaticUpload")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
+        images.folder =  UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: folderWidth)
+        
+        images.checkedYes = UIImage(named: "checkedYes")!.image(color: .darkGray, size: 50)
+        images.checkedNo = UIImage(named: "checkedNo")!.image(color: NCBrandColor.shared.graySoft, size: 50)
+        
+        images.buttonMore = UIImage(named: "more")!.image(color: NCBrandColor.shared.graySoft, size: 50)
+        images.buttonStop = UIImage(named: "stop")!.image(color: NCBrandColor.shared.graySoft, size: 50)
     }
     
     // MARK: - NCSelect + Delegate

+ 39 - 39
iOSClient/Main/Colleaction Common/NCCollectionViewCommon.swift

@@ -517,7 +517,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
                             if progress > 0 {
                                 cell.progressView?.isHidden = false
                                 cell.progressView?.progress = progress
-                                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.cellButtonStop)
+                                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.buttonStop)
                                 if status == NCGlobal.shared.metadataStatusInDownload {
                                     cell.labelInfo.text = CCUtility.transformedSize(totalBytesExpected) + " - ↓ " + CCUtility.transformedSize(totalBytes)
                                 } else if status == NCGlobal.shared.metadataStatusInUpload {
@@ -529,7 +529,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
                             if progress > 0 {
                                 cell.progressView?.isHidden = false
                                 cell.progressView?.progress = progress
-                                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.cellButtonStop)
+                                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.buttonStop)
                                 if status == NCGlobal.shared.metadataStatusInDownload {
                                     cell.labelInfo.text = CCUtility.transformedSize(totalBytesExpected) + " - ↓ " + CCUtility.transformedSize(totalBytes)
                                 } else if status == NCGlobal.shared.metadataStatusInUpload {
@@ -541,7 +541,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
                             if progress > 0 {
                                 cell.progressView.isHidden = false
                                 cell.progressView.progress = progress
-                                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.cellButtonStop)
+                                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.buttonStop)
                             }
                         }
                     }
@@ -1199,21 +1199,21 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             if metadata.directory {
                 
                 if metadata.e2eEncrypted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderEncryptedImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderEncrypted
                 } else if isShare {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare?.shareType != 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare?.shareType == 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderPublicImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderPublic
                 } else if metadata.mountType == "group" {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderGroupImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderGroup
                 } else if isMounted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderExternalImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderExternal
                 } else if metadata.fileName == autoUploadFileName && metadata.serverUrl == autoUploadDirectory {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderAutomaticUploadImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderAutomaticUpload
                 } else {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderImage
+                    cell.imageItem.image = NCCollectionCommon.images.folder
                 }
                 
                 cell.labelInfo.text = CCUtility.dateDiff(metadata.date as Date)
@@ -1223,7 +1223,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 
                 // Local image: offline
                 if tableDirectory != nil && tableDirectory!.offline {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 }
                 
             } else {
@@ -1237,7 +1237,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                         if metadata.iconName.count > 0 {
                             cell.imageItem.image = UIImage.init(named: metadata.iconName)
                         } else {
-                            cell.imageItem.image = NCCollectionCommon.images.cellFileImage
+                            cell.imageItem.image = NCCollectionCommon.images.file
                         }
                     }
                 }
@@ -1246,26 +1246,26 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                                 
                 // image local
                 if dataSource.metadataOffLine.contains(metadata.ocId) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 } else if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellLocal
+                    cell.imageLocal.image = NCCollectionCommon.images.local
                 }
             }
             
             // image Favorite
             if metadata.favorite {
-                cell.imageFavorite.image = NCCollectionCommon.images.cellFavouriteImage
+                cell.imageFavorite.image = NCCollectionCommon.images.favorite
             }
             
             // Share image
             if (isShare) {
-                cell.imageShared.image = NCCollectionCommon.images.cellSharedImage
+                cell.imageShared.image = NCCollectionCommon.images.shared
             } else if (tableShare != nil && tableShare?.shareType == 3) {
-                cell.imageShared.image = NCCollectionCommon.images.cellShareByLinkImage
+                cell.imageShared.image = NCCollectionCommon.images.shareByLink
             } else if (tableShare != nil && tableShare?.shareType != 3) {
-                cell.imageShared.image = NCCollectionCommon.images.cellSharedImage
+                cell.imageShared.image = NCCollectionCommon.images.shared
             } else {
-                cell.imageShared.image = NCCollectionCommon.images.cellCanShareImage
+                cell.imageShared.image = NCCollectionCommon.images.canShare
             }
             if metadata.ownerId.count > 0 && metadata.ownerId != appDelegate.userId {
                 var fileNameUser = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.user, urlBase: appDelegate.urlBase) + "-" + metadata.ownerId
@@ -1292,11 +1292,11 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             }
             if metadata.status == NCGlobal.shared.metadataStatusInDownload || metadata.status == NCGlobal.shared.metadataStatusDownloading ||  metadata.status >= NCGlobal.shared.metadataStatusTypeUpload {
                 cell.progressView.isHidden = false
-                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.cellButtonStop)
+                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.buttonStop)
             } else {
                 cell.progressView.isHidden = true
                 cell.progressView.progress = progress
-                cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCCollectionCommon.images.cellButtonMore)
+                cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCCollectionCommon.images.buttonMore)
             }
             // Write status on Label Info
             switch metadata.status {
@@ -1324,7 +1324,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             
             // Live Photo
             if metadata.livePhoto {
-                cell.imageStatus.image = NCCollectionCommon.images.cellLivePhotoImage
+                cell.imageStatus.image = NCCollectionCommon.images.livePhoto
             }
             
             // E2EE
@@ -1387,21 +1387,21 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             if metadata.directory {
                 
                 if metadata.e2eEncrypted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderEncryptedImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderEncrypted
                 } else if isShare {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare!.shareType != 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare!.shareType == 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderPublicImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderPublic
                 } else if metadata.mountType == "group" {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderGroupImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderGroup
                 } else if isMounted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderExternalImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderExternal
                 } else if metadata.fileName == autoUploadFileName && metadata.serverUrl == autoUploadDirectory {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderAutomaticUploadImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderAutomaticUpload
                 } else {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderImage
+                    cell.imageItem.image = NCCollectionCommon.images.folder
                 }
     
                 let lockServerUrl = CCUtility.stringAppendServerUrl(metadata.serverUrl, addFileName: metadata.fileName)!
@@ -1409,7 +1409,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                                 
                 // Local image: offline
                 if tableDirectory != nil && tableDirectory!.offline {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 }
                 
             } else {
@@ -1423,37 +1423,37 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                         if metadata.iconName.count > 0 {
                             cell.imageItem.image = UIImage.init(named: metadata.iconName)
                         } else {
-                            cell.imageItem.image = NCCollectionCommon.images.cellFileImage
+                            cell.imageItem.image = NCCollectionCommon.images.file
                         }
                     }
                 }
                 
                 // image Local
                 if dataSource.metadataOffLine.contains(metadata.ocId) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 } else if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellLocal
+                    cell.imageLocal.image = NCCollectionCommon.images.local
                 }
             }
             
             // image Favorite
             if metadata.favorite {
-                cell.imageFavorite.image = NCCollectionCommon.images.cellFavouriteImage
+                cell.imageFavorite.image = NCCollectionCommon.images.favorite
             }
             
             // Transfer
             if metadata.status == NCGlobal.shared.metadataStatusInDownload || metadata.status == NCGlobal.shared.metadataStatusDownloading ||  metadata.status >= NCGlobal.shared.metadataStatusTypeUpload {
                 cell.progressView.isHidden = false
-                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.cellButtonStop)
+                cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.buttonStop)
             } else {
                 cell.progressView.isHidden = true
                 cell.progressView.progress = 0.0
-                cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCCollectionCommon.images.cellButtonMore)
+                cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCCollectionCommon.images.buttonMore)
             }
             
             // Live Photo
             if metadata.livePhoto {
-                cell.imageStatus.image = NCCollectionCommon.images.cellLivePhotoImage
+                cell.imageStatus.image = NCCollectionCommon.images.livePhoto
             }
             
             // Edit mode

+ 1 - 1
iOSClient/Main/Colleaction Common/NCGridCell.swift

@@ -113,7 +113,7 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCImageCell
     
     func selected(_ status: Bool) {
         if status {
-            imageSelect.image = NCCollectionCommon.images.cellCheckedYes
+            imageSelect.image = NCCollectionCommon.images.checkedYes
             imageVisualEffect.isHidden = false
             imageVisualEffect.alpha = 0.4
         } else {

+ 2 - 2
iOSClient/Main/Colleaction Common/NCListCell.swift

@@ -131,7 +131,7 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCImageCell
     
     func selected(_ status: Bool) {
         if status {
-            imageSelect.image = NCCollectionCommon.images.cellCheckedYes
+            imageSelect.image = NCCollectionCommon.images.checkedYes
             
             let blurEffect = UIBlurEffect(style: .extraLight)
             let blurEffectView = UIVisualEffectView(effect: blurEffect)
@@ -142,7 +142,7 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCImageCell
             
             separator.isHidden = true
         } else {
-            imageSelect.image = NCCollectionCommon.images.cellCheckedNo
+            imageSelect.image = NCCollectionCommon.images.checkedNo
             backgroundView = nil
             separator.isHidden = false
         }

+ 3 - 11
iOSClient/Main/Menu/NCCollectionViewCommon+Menu.swift

@@ -86,18 +86,10 @@ extension NCCollectionViewCommon {
         if image != nil {
             iconHeader = image!
         } else {
-            if let icon = UIImage(contentsOfFile: CCUtility.getDirectoryProviderStorageIconOcId(metadata.ocId, etag: metadata.etag)) {
-                iconHeader = icon
+            if metadata.directory {
+                iconHeader = NCCollectionCommon.images.folder
             } else {
-                if metadata.directory {
-                    if metadata.e2eEncrypted {
-                        iconHeader = NCCollectionCommon.images.cellFolderEncryptedImage
-                    } else {
-                        iconHeader = NCCollectionCommon.images.cellFolderImage
-                    }
-                } else {
-                    iconHeader = UIImage(named: metadata.iconName)
-                }
+                iconHeader = NCCollectionCommon.images.file
             }
         }
         

+ 1 - 1
iOSClient/Media/Cell/NCGridMediaCell.swift

@@ -76,7 +76,7 @@ class NCGridMediaCell: UICollectionViewCell, NCImageCellProtocol {
     
     func selected(_ status: Bool) {
         if status {
-            imageSelect.image = NCCollectionCommon.images.cellCheckedYes
+            imageSelect.image = NCCollectionCommon.images.checkedYes
             imageVisualEffect.isHidden = false
             imageVisualEffect.alpha = 0.4
         } else {

+ 1 - 1
iOSClient/Media/NCMedia.swift

@@ -572,7 +572,7 @@ extension NCMedia: UICollectionViewDataSource {
                 if metadata.iconName.count > 0 {
                     cell.imageItem.image = UIImage.init(named: metadata.iconName)
                 } else {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFileImage
+                    cell.imageItem.image = NCCollectionCommon.images.file
                 }
             }
             cell.date = metadata.date as Date

+ 2 - 2
iOSClient/Rename file/NCRenameFile.swift

@@ -72,7 +72,7 @@ class NCRenameFile: UIViewController, UITextFieldDelegate {
             if metadata.directory {
                 
                 if imagePreview == nil {
-                    previewFile.image = NCCollectionCommon.images.cellFolderImage
+                    previewFile.image = NCCollectionCommon.images.folder
                 }
                 
                 ext.isHidden = true
@@ -88,7 +88,7 @@ class NCRenameFile: UIViewController, UITextFieldDelegate {
                         if metadata.iconName.count > 0 {
                             previewFile.image = UIImage.init(named: metadata.iconName)
                         } else {
-                            previewFile.image = NCCollectionCommon.images.cellFileImage
+                            previewFile.image = NCCollectionCommon.images.file
                         }
                     }
                 }

+ 32 - 32
iOSClient/Select/NCSelect.swift

@@ -497,21 +497,21 @@ extension NCSelect: UICollectionViewDataSource {
             if metadata.directory {
                 
                 if metadata.e2eEncrypted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderEncryptedImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderEncrypted
                 } else if isShare {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare?.shareType != 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare?.shareType == 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderPublicImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderPublic
                 } else if metadata.mountType == "group" {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderGroupImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderGroup
                 } else if isMounted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderExternalImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderExternal
                 } else if metadata.fileName == autoUploadFileName && metadata.serverUrl == autoUploadDirectory {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderAutomaticUploadImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderAutomaticUpload
                 } else {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderImage
+                    cell.imageItem.image = NCCollectionCommon.images.folder
                 }
                 
                 cell.labelInfo.text = CCUtility.dateDiff(metadata.date as Date)
@@ -521,7 +521,7 @@ extension NCSelect: UICollectionViewDataSource {
                 
                 // Local image: offline
                 if tableDirectory != nil && tableDirectory!.offline {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 }
                 
             } else {
@@ -535,7 +535,7 @@ extension NCSelect: UICollectionViewDataSource {
                         if metadata.iconName.count > 0 {
                             cell.imageItem.image = UIImage.init(named: metadata.iconName)
                         } else {
-                            cell.imageItem.image = NCCollectionCommon.images.cellFileImage
+                            cell.imageItem.image = NCCollectionCommon.images.file
                         }
                     }
                 }
@@ -544,26 +544,26 @@ extension NCSelect: UICollectionViewDataSource {
                 
                 // image local
                 if dataSource.metadataOffLine.contains(metadata.ocId) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 } else if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellLocal
+                    cell.imageLocal.image = NCCollectionCommon.images.local
                 }
             }
             
             // image Favorite
             if metadata.favorite {
-                cell.imageFavorite.image = NCCollectionCommon.images.cellFavouriteImage
+                cell.imageFavorite.image = NCCollectionCommon.images.favorite
             }
             
             // Share image
             if (isShare) {
-                cell.imageShared.image = NCCollectionCommon.images.cellSharedImage
+                cell.imageShared.image = NCCollectionCommon.images.shared
             } else if (tableShare != nil && tableShare?.shareType == 3) {
-                cell.imageShared.image = NCCollectionCommon.images.cellShareByLinkImage
+                cell.imageShared.image = NCCollectionCommon.images.shareByLink
             } else if (tableShare != nil && tableShare?.shareType != 3) {
-                cell.imageShared.image = NCCollectionCommon.images.cellSharedImage
+                cell.imageShared.image = NCCollectionCommon.images.shared
             } else {
-                cell.imageShared.image = NCCollectionCommon.images.cellCanShareImage
+                cell.imageShared.image = NCCollectionCommon.images.canShare
             }
             if metadata.ownerId.count > 0 && metadata.ownerId != appDelegate.userId {
                 var fileNameUser = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.user, urlBase: appDelegate.urlBase) + "-" + metadata.ownerId
@@ -587,7 +587,7 @@ extension NCSelect: UICollectionViewDataSource {
     
             // Live Photo
             if metadata.livePhoto {
-                cell.imageStatus.image = NCCollectionCommon.images.cellLivePhotoImage
+                cell.imageStatus.image = NCCollectionCommon.images.livePhoto
             }
             
             // Remove last separator
@@ -625,21 +625,21 @@ extension NCSelect: UICollectionViewDataSource {
             if metadata.directory {
                 
                 if metadata.e2eEncrypted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderEncryptedImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderEncrypted
                 } else if isShare {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare!.shareType != 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderSharedWithMeImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderSharedWithMe
                 } else if (tableShare != nil && tableShare!.shareType == 3) {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderPublicImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderPublic
                 } else if metadata.mountType == "group" {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderGroupImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderGroup
                 } else if isMounted {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderExternalImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderExternal
                 } else if metadata.fileName == autoUploadFileName && metadata.serverUrl == autoUploadDirectory {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderAutomaticUploadImage
+                    cell.imageItem.image = NCCollectionCommon.images.folderAutomaticUpload
                 } else {
-                    cell.imageItem.image = NCCollectionCommon.images.cellFolderImage
+                    cell.imageItem.image = NCCollectionCommon.images.folder
                 }
     
                 let lockServerUrl = CCUtility.stringAppendServerUrl(metadata.serverUrl, addFileName: metadata.fileName)!
@@ -647,7 +647,7 @@ extension NCSelect: UICollectionViewDataSource {
                                 
                 // Local image: offline
                 if tableDirectory != nil && tableDirectory!.offline {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 }
                 
             } else {
@@ -661,22 +661,22 @@ extension NCSelect: UICollectionViewDataSource {
                         if metadata.iconName.count > 0 {
                             cell.imageItem.image = UIImage.init(named: metadata.iconName)
                         } else {
-                            cell.imageItem.image = NCCollectionCommon.images.cellFileImage
+                            cell.imageItem.image = NCCollectionCommon.images.file
                         }
                     }
                 }
                 
                 // image Local
                 if dataSource.metadataOffLine.contains(metadata.ocId) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellOfflineFlag
+                    cell.imageLocal.image = NCCollectionCommon.images.offlineFlag
                 } else if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
-                    cell.imageLocal.image = NCCollectionCommon.images.cellLocal
+                    cell.imageLocal.image = NCCollectionCommon.images.local
                 }
             }
             
             // image Favorite
             if metadata.favorite {
-                cell.imageFavorite.image = NCCollectionCommon.images.cellFavouriteImage
+                cell.imageFavorite.image = NCCollectionCommon.images.favorite
             }
             
             cell.imageSelect.isHidden = true
@@ -685,7 +685,7 @@ extension NCSelect: UICollectionViewDataSource {
 
             // Live Photo
             if metadata.livePhoto {
-                cell.imageStatus.image = NCCollectionCommon.images.cellLivePhotoImage
+                cell.imageStatus.image = NCCollectionCommon.images.livePhoto
             }
             
             return cell

+ 2 - 2
iOSClient/Transfers/NCTransfers.swift

@@ -188,7 +188,7 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate  {
         if pathText == "" { pathText = "/" }
         cell.labelPath.text = pathText
         
-        cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.cellButtonStop)
+        cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCCollectionCommon.images.buttonStop)
 
         cell.progressView.progress = 0.0
         cell.separator.backgroundColor = NCBrandColor.shared.separator
@@ -200,7 +200,7 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate  {
         }
         
         if cell.imageItem.image == nil {
-            cell.imageItem.image = NCCollectionCommon.images.cellFileImage
+            cell.imageItem.image = NCCollectionCommon.images.file
         }
         
         cell.labelInfo.text = CCUtility.dateDiff(metadata.date as Date) + " · " + CCUtility.transformedSize(metadata.size)

+ 2 - 2
iOSClient/Trash/Cell/NCTrashListCell.swift

@@ -79,7 +79,7 @@ class NCTrashListCell: UICollectionViewCell {
     
     func selected(_ status: Bool) {
         if status {
-            imageSelect.image = NCCollectionCommon.images.cellCheckedYes
+            imageSelect.image = NCCollectionCommon.images.checkedYes
             
             let blurEffect = UIBlurEffect(style: .extraLight)
             let blurEffectView = UIVisualEffectView(effect: blurEffect)
@@ -89,7 +89,7 @@ class NCTrashListCell: UICollectionViewCell {
             backgroundView = blurEffectView
             
         } else {
-            imageSelect.image = NCCollectionCommon.images.cellCheckedNo
+            imageSelect.image = NCCollectionCommon.images.checkedNo
             backgroundView = nil
         }
     }

+ 2 - 2
iOSClient/Trash/NCTrash.swift

@@ -473,7 +473,7 @@ extension NCTrash: UICollectionViewDataSource {
             cell.separator.backgroundColor = NCBrandColor.shared.separator
 
             if tableTrash.directory {
-                cell.imageItem.image = NCCollectionCommon.images.cellFolderImage
+                cell.imageItem.image = NCCollectionCommon.images.folder
                 cell.labelInfo.text = CCUtility.dateDiff(tableTrash.date as Date)
             } else {
                 cell.imageItem.image = image
@@ -505,7 +505,7 @@ extension NCTrash: UICollectionViewDataSource {
             cell.labelTitle.textColor = NCBrandColor.shared.textView
             
             if tableTrash.directory {
-                cell.imageItem.image = NCCollectionCommon.images.cellFolderImage
+                cell.imageItem.image = NCCollectionCommon.images.folder
             } else {
                 cell.imageItem.image = image
             }