diff --git a/iOSClient/Extensions/UINavigationController+Extension.swift b/iOSClient/Extensions/UINavigationController+Extension.swift index a086bebfff..877e4c5a0c 100644 --- a/iOSClient/Extensions/UINavigationController+Extension.swift +++ b/iOSClient/Extensions/UINavigationController+Extension.swift @@ -32,7 +32,7 @@ extension UINavigationController { func setFileAppreance() { - navigationBar.tintColor = .systemBlue + navigationBar.tintColor = NCBrandColor.shared.brand let standardAppearance = UINavigationBarAppearance() standardAppearance.configureWithDefaultBackground() @@ -53,7 +53,7 @@ extension UINavigationController { func setGroupAppearance() { - navigationBar.tintColor = .systemBlue + navigationBar.tintColor = NCBrandColor.shared.brand let standardAppearance = UINavigationBarAppearance() standardAppearance.configureWithDefaultBackground() diff --git a/iOSClient/Favorites/NCFavorite.swift b/iOSClient/Favorites/NCFavorite.swift index 8cb42a5cfd..1af18d86aa 100644 --- a/iOSClient/Favorites/NCFavorite.swift +++ b/iOSClient/Favorites/NCFavorite.swift @@ -33,7 +33,7 @@ class NCFavorite: NCCollectionViewCommon { titleCurrentFolder = NSLocalizedString("_favorites_", comment: "") layoutKey = NCGlobal.shared.layoutViewFavorite - enableSearchBar = false + enableSearchBar = true headerMenuButtonsView = true headerRichWorkspaceDisable = true emptyImage = UIImage(named: "star.fill")?.image(color: NCBrandColor.shared.yellowFavorite, size: UIScreen.main.bounds.width) diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift index 07f0364a04..c2b445a3ee 100644 --- a/iOSClient/Files/NCFiles.swift +++ b/iOSClient/Files/NCFiles.swift @@ -41,7 +41,7 @@ class NCFiles: NCCollectionViewCommon { headerMenuButtonsView = true headerRichWorkspaceDisable = false headerMenuTransferView = true - emptyImage = UIImage(named: "folder")?.image(color: NCBrandColor.shared.brandElement, size: UIScreen.main.bounds.width) + emptyImage = UIImage(named: "folder") emptyTitle = "_files_no_files_" emptyDescription = "_no_file_pull_down_" } diff --git a/iOSClient/Groupfolders/NCGroupfolders.swift b/iOSClient/Groupfolders/NCGroupfolders.swift index 813b4ded9f..9323720c6d 100644 --- a/iOSClient/Groupfolders/NCGroupfolders.swift +++ b/iOSClient/Groupfolders/NCGroupfolders.swift @@ -36,7 +36,7 @@ class NCGroupfolders: NCCollectionViewCommon { enableSearchBar = false headerMenuButtonsView = true headerRichWorkspaceDisable = true - emptyImage = UIImage(named: "folder_group")?.image(color: NCBrandColor.shared.brandElement, size: UIScreen.main.bounds.width) + emptyImage = UIImage(named: "folder_group") emptyTitle = "_files_no_files_" emptyDescription = "_tutorial_groupfolders_view_" } diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift index 851265c26b..cb14aa20cb 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift @@ -110,7 +110,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS searchController?.searchBar.delegate = self searchController?.searchBar.autocapitalizationType = .none navigationItem.searchController = searchController - navigationItem.hidesSearchBarWhenScrolling = true + navigationItem.hidesSearchBarWhenScrolling = false + navigationItem.backBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_back_", comment: ""), style: .plain, target: nil, action: nil) } // Cell @@ -164,6 +165,11 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + // Deselect items when back to previous view controller + if isEditMode { + self.tapSelect() + } + appDelegate.activeViewController = self layoutForView = NCManageDatabase.shared.getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl) @@ -264,10 +270,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS self.collectionView?.collectionViewLayout.invalidateLayout() self.collectionView?.reloadData() self.tipView?.dismiss() - - coordinator.animate(alongsideTransition: nil) { _ in - self.showTip() - } } override var canBecomeFirstResponder: Bool { @@ -281,11 +283,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS } @objc func reloadAvatar(_ notification: NSNotification) { - - DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { - self.showTip() - } - guard let userInfo = notification.userInfo as NSDictionary?, let error = userInfo["error"] as? NKError, error.errorCode != NCGlobal.shared.errorNotModified else { return } @@ -566,70 +563,12 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS navigationItem.title = titleCurrentFolder guard layoutKey == NCGlobal.shared.layoutViewFiles else { return } - - // PROFILE BUTTON - - let activeAccount = NCManageDatabase.shared.getActiveAccount() - - let image = utility.loadUserImage( - for: appDelegate.user, - displayName: activeAccount?.displayName, - userBaseUrl: appDelegate) - - let button = UIButton(type: .custom) - button.setImage(image, for: .normal) - - if serverUrl == utilityFileSystem.getHomeServer(urlBase: appDelegate.urlBase, userId: appDelegate.userId) { - - var titleButton = " " - - if getNavigationTitle() == activeAccount?.alias { - titleButton = "" - } else { - titleButton += activeAccount?.displayName ?? "" - } - - button.setTitle(titleButton, for: .normal) - button.setTitleColor(.systemBlue, for: .normal) - } - - button.semanticContentAttribute = .forceLeftToRight - button.sizeToFit() - button.action(for: .touchUpInside) { _ in - - let accounts = NCManageDatabase.shared.getAllAccountOrderAlias() - if !accounts.isEmpty, !NCBrandOptions.shared.disable_multiaccount, !NCBrandOptions.shared.disable_manage_account { - - if let vcAccountRequest = UIStoryboard(name: "NCAccountRequest", bundle: nil).instantiateInitialViewController() as? NCAccountRequest { - - vcAccountRequest.activeAccount = NCManageDatabase.shared.getActiveAccount() - vcAccountRequest.accounts = accounts - vcAccountRequest.enableTimerProgress = false - vcAccountRequest.enableAddAccount = true - vcAccountRequest.delegate = self - vcAccountRequest.dismissDidEnterBackground = true - - let screenHeighMax = UIScreen.main.bounds.height - (UIScreen.main.bounds.height / 5) - let numberCell = accounts.count + 1 - let height = min(CGFloat(numberCell * Int(vcAccountRequest.heightCell) + 45), screenHeighMax) - - let popup = NCPopupViewController(contentController: vcAccountRequest, popupWidth: 300, popupHeight: height) - - self.present(popup, animated: true) - } - - // TIP - self.dismissTip() - } - } - navigationItem.setLeftBarButton(UIBarButtonItem(customView: button), animated: true) navigationItem.leftItemsSupplementBackButton = true if titlePreviusFolder == nil { navigationController?.navigationBar.topItem?.title = getNavigationTitle() } else { navigationController?.navigationBar.topItem?.title = titlePreviusFolder } - navigationItem.title = titleCurrentFolder } func getNavigationTitle() -> String { @@ -664,7 +603,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS view.emptyTitle.text = NSLocalizedString(emptyTitle, comment: "") view.emptyDescription.text = NSLocalizedString(emptyDescription, comment: "") } else { - view.emptyImage.image = UIImage(named: "folder")?.image(color: NCBrandColor.shared.brandElement, size: UIScreen.main.bounds.width) + view.emptyImage.image = UIImage(named: "folder_nmcloud") view.emptyTitle.text = NSLocalizedString("_files_no_files_", comment: "") view.emptyDescription.text = NSLocalizedString("_no_file_pull_down_", comment: "") } @@ -1233,15 +1172,6 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { } } } - - // Avatar - if !metadata.ownerId.isEmpty, - metadata.ownerId != appDelegate.userId, - appDelegate.account == metadata.account, - let cell = cell as? NCCellProtocol { - let fileName = metadata.userBaseUrl + "-" + metadata.ownerId + ".png" - NCNetworking.shared.downloadAvatar(user: metadata.ownerId, dispalyName: metadata.ownerDisplayName, fileName: fileName, cell: cell, view: collectionView, cellImageView: cell.fileAvatarImageView) - } } func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { @@ -1291,7 +1221,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { var isShare = false var isMounted = false var a11yValues: [String] = [] - + let shares = NCManageDatabase.shared.getTableShares(metadata: metadata) if metadataFolder != nil { isShare = metadata.permissions.contains(NCGlobal.shared.permissionShared) && !metadataFolder!.permissions.contains(NCGlobal.shared.permissionShared) isMounted = metadata.permissions.contains(NCGlobal.shared.permissionMounted) && !metadataFolder!.permissions.contains(NCGlobal.shared.permissionMounted) @@ -1318,7 +1248,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { cell.fileTitleLabel?.text = metadata.fileName cell.fileTitleLabel?.lineBreakMode = .byTruncatingTail if metadata.name == NCGlobal.shared.appName { - cell.fileInfoLabel?.text = NSLocalizedString("_in_", comment: "") + " " + utilityFileSystem.getPath(path: metadata.path, user: metadata.user) + cell.fileInfoLabel?.text = utility.dateDiff(metadata.date as Date) + " ยท " + utilityFileSystem.transformedSize(metadata.size) } else { cell.fileInfoLabel?.text = metadata.subline } @@ -1345,7 +1275,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { cell.filePreviewImageView?.image = NCImageCache.images.folderEncrypted } else if isShare { cell.filePreviewImageView?.image = NCImageCache.images.folderSharedWithMe - } else if !metadata.shareType.isEmpty { + } else if (!metadata.shareType.isEmpty || !(shares.share?.isEmpty ?? true) || (shares.firstShareLink != nil)) { metadata.shareType.contains(3) ? (cell.filePreviewImageView?.image = NCImageCache.images.folderPublic) : (cell.filePreviewImageView?.image = NCImageCache.images.folderSharedWithMe) @@ -1392,14 +1322,24 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { if isShare { cell.fileSharedImage?.image = NCImageCache.images.shared } else if !metadata.shareType.isEmpty { - metadata.shareType.contains(3) ? - (cell.fileSharedImage?.image = NCImageCache.images.shareByLink) : (cell.fileSharedImage?.image = NCImageCache.images.shared) } else { - cell.fileSharedImage?.image = NCImageCache.images.canShare + cell.fileSharedImage?.image = NCImageCache.images.canShare.image(color: NCBrandColor.shared.gray60, size: 50) + cell.fileSharedLabel?.text = "" } - if appDelegate.account != metadata.account { - cell.fileSharedImage?.image = NCImageCache.images.shared + cell.fileSharedLabel?.text = NSLocalizedString("_shared_", comment: "") + cell.fileSharedLabel?.textColor = NCBrandColor.shared.customer + if (!metadata.shareType.isEmpty || !(shares.share?.isEmpty ?? true) || (shares.firstShareLink != nil)){ + cell.fileSharedImage?.image = cell.fileSharedImage?.image?.imageColor(NCBrandColor.shared.customer) + } else { + cell.fileSharedImage?.image = NCImageCache.images.canShare.image(color: NCBrandColor.shared.gray60, size: 50) + cell.fileSharedLabel?.text = "" + } + + if metadata.permissions.contains("S"), (metadata.permissions.range(of: "S") != nil) { + cell.fileSharedImage?.image = NCImageCache.images.sharedWithMe + cell.fileSharedLabel?.text = NSLocalizedString("_recieved_", comment: "") + cell.fileSharedLabel?.textColor = NCBrandColor.shared.notificationAction } // Button More @@ -1455,6 +1395,15 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { } } + // Hide lines on iPhone + if !UIDevice.current.orientation.isLandscape && UIDevice.current.model.hasPrefix("iPhone") { + cell.cellSeparatorView?.isHidden = true + cell.fileSharedLabel?.isHidden = true + }else{ + cell.cellSeparatorView?.isHidden = false + cell.fileSharedLabel?.isHidden = false + } + // Separator if collectionView.numberOfItems(inSection: indexPath.section) == indexPath.row + 1 || isSearchingMode { cell.cellSeparatorView?.isHidden = true @@ -1478,14 +1427,6 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { // Accessibility cell.setAccessibility(label: metadata.fileNameView + ", " + (cell.fileInfoLabel?.text ?? ""), value: a11yValues.joined(separator: ", ")) - // Color string find in search - if isSearchingMode, let literalSearch = self.literalSearch, let title = cell.fileTitleLabel?.text { - let longestWordRange = (title.lowercased() as NSString).range(of: literalSearch) - let attributedString = NSMutableAttributedString(string: title, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 15)]) - attributedString.setAttributes([NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 15), NSAttributedString.Key.foregroundColor: UIColor.systemBlue], range: longestWordRange) - cell.fileTitleLabel?.attributedText = attributedString - } - // Add TAGS cell.setTags(tags: Array(metadata.tags)) @@ -1509,7 +1450,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { let (_, heightHeaderRichWorkspace, heightHeaderSection) = getHeaderHeight(section: indexPath.section) self.headerMenu = header - + self.headerMenu?.setViewTransfer(isHidden: true) if layoutForView?.layout == NCGlobal.shared.layoutGrid { header.setImageSwitchList() header.buttonSwitch.accessibilityLabel = NSLocalizedString("_list_view_", comment: "") @@ -1519,7 +1460,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { } header.delegate = self - + if !isSearchingMode, headerMenuTransferView, let ocId = NCNetworking.shared.transferInForegorund?.ocId { let text = String(format: NSLocalizedString("_upload_foreground_msg_", comment: ""), NCBrandOptions.shared.brand) header.setViewTransfer(isHidden: false, ocId: ocId, text: text, progress: NCNetworking.shared.transferInForegorund?.progress) @@ -1573,6 +1514,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { footer.setTitleLabel("") footer.setButtonText(NSLocalizedString("_show_more_results_", comment: "")) + footer.buttonSection.setTitleColor(NCBrandColor.shared.customer, for: .normal) footer.separatorIsHidden(true) footer.buttonIsHidden(true) footer.hideActivityIndicatorSection() @@ -1613,7 +1555,6 @@ extension NCCollectionViewCommon: UICollectionViewDelegateFlowLayout { func getHeaderHeight() -> CGFloat { var size: CGFloat = 0 - // transfer in progress if headerMenuTransferView, let metadata = NCManageDatabase.shared.getMetadataFromOcId(NCNetworking.shared.transferInForegorund?.ocId), @@ -1624,7 +1565,7 @@ extension NCCollectionViewCommon: UICollectionViewDelegateFlowLayout { } else { NCNetworking.shared.transferInForegorund = nil } - + if headerMenuButtonsView { size += NCGlobal.shared.heightButtonsView } diff --git a/iOSClient/Main/Collection Common/NCGridCell.swift b/iOSClient/Main/Collection Common/NCGridCell.swift index 682b14fb85..a81bdc04be 100644 --- a/iOSClient/Main/Collection Common/NCGridCell.swift +++ b/iOSClient/Main/Collection Common/NCGridCell.swift @@ -181,7 +181,7 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto } func selected(_ status: Bool) { - guard let metadata = NCManageDatabase.shared.getMetadataFromOcId(objectId), !metadata.isInTransfer else { + guard let metadata = NCManageDatabase.shared.getMetadataFromOcId(objectId), !metadata.isInTransfer, !metadata.e2eEncrypted else { imageSelect.isHidden = true imageVisualEffect.isHidden = true return @@ -197,7 +197,7 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto imageSelect.image = NCImageCache.images.checkedYes imageVisualEffect.isHidden = false } else { - imageSelect.isHidden = true + imageSelect.image = NCImageCache.images.checkedNo imageVisualEffect.isHidden = true } } diff --git a/iOSClient/Main/Collection Common/NCListCell.swift b/iOSClient/Main/Collection Common/NCListCell.swift index 5c0bc6e3f8..79bcfee43f 100755 --- a/iOSClient/Main/Collection Common/NCListCell.swift +++ b/iOSClient/Main/Collection Common/NCListCell.swift @@ -38,12 +38,9 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto @IBOutlet weak var buttonMore: UIButton! @IBOutlet weak var progressView: UIProgressView! @IBOutlet weak var separator: UIView! - @IBOutlet weak var tag0: UILabel! - @IBOutlet weak var tag1: UILabel! - + @IBOutlet weak var labelShared: UILabel! @IBOutlet weak var imageItemLeftConstraint: NSLayoutConstraint! @IBOutlet weak var separatorHeightConstraint: NSLayoutConstraint! - @IBOutlet weak var titleTrailingConstraint: NSLayoutConstraint! @IBOutlet weak var infoTrailingConstraint: NSLayoutConstraint! private var objectId = "" @@ -108,7 +105,11 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto get { return separator } set { separator = newValue } } - + + var fileSharedLabel: UILabel? { + get { return labelShared } + set { labelShared = newValue } + } override func awakeFromNib() { super.awakeFromNib() @@ -189,12 +190,10 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto } func titleInfoTrailingFull() { - titleTrailingConstraint.constant = 10 infoTrailingConstraint.constant = 10 } func titleInfoTrailingDefault() { - titleTrailingConstraint.constant = 90 infoTrailingConstraint.constant = 90 } @@ -241,7 +240,7 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto } func selected(_ status: Bool) { - guard let metadata = NCManageDatabase.shared.getMetadataFromOcId(objectId), !metadata.isInTransfer else { + guard let metadata = NCManageDatabase.shared.getMetadataFromOcId(objectId), !metadata.isInTransfer, !metadata.e2eEncrypted else { backgroundView = nil separator.isHidden = false return @@ -278,25 +277,6 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto accessibilityLabel = label accessibilityValue = value } - - func setTags(tags: [String]) { - if tags.isEmpty { - tag0.isHidden = true - tag1.isHidden = true - labelInfo.isHidden = false - } else { - tag0.isHidden = false - tag1.isHidden = true - labelInfo.isHidden = true - if let tag = tags.first { - tag0.text = tag - if tags.count > 1 { - tag1.isHidden = false - tag1.text = "+\(tags.count - 1)" - } - } - } - } } protocol NCListCellDelegate: AnyObject { diff --git a/iOSClient/Main/Collection Common/NCListCell.xib b/iOSClient/Main/Collection Common/NCListCell.xib index b32510775e..c806533c74 100755 --- a/iOSClient/Main/Collection Common/NCListCell.xib +++ b/iOSClient/Main/Collection Common/NCListCell.xib @@ -1,252 +1,182 @@ - + - + - - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - diff --git a/iOSClient/Main/NCCellProtocol.swift b/iOSClient/Main/NCCellProtocol.swift index 746d8cefe1..63d034fadb 100644 --- a/iOSClient/Main/NCCellProtocol.swift +++ b/iOSClient/Main/NCCellProtocol.swift @@ -40,6 +40,7 @@ protocol NCCellProtocol { var fileMoreImage: UIImageView? { get set } var cellSeparatorView: UIView? { get set } var indexPath: IndexPath { get set } + var fileSharedLabel: UILabel? { get set } func titleInfoTrailingDefault() func titleInfoTrailingFull() @@ -106,6 +107,10 @@ extension NCCellProtocol { get { return nil } set {} } + var fileSharedLabel: UILabel? { + get { return nil } + set { } + } func titleInfoTrailingDefault() {} func titleInfoTrailingFull() {} diff --git a/iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.swift b/iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.swift index ce63337ef9..b048947042 100644 --- a/iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.swift +++ b/iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.swift @@ -61,11 +61,11 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate backgroundColor = .clear - buttonSwitch.setImage(UIImage(systemName: "list.bullet")!.image(color: .systemGray, size: 25), for: .normal) + buttonSwitch.setImage(UIImage(systemName: "list.bullet")!.image(color: NCBrandColor.shared.iconColor, size: 25), for: .normal) buttonOrder.setTitle("", for: .normal) - buttonOrder.setTitleColor(.systemBlue, for: .normal) - buttonMore.setImage(UIImage(named: "more")!.image(color: .systemGray, size: 25), for: .normal) + buttonOrder.setTitleColor(NCBrandColor.shared.brand, for: .normal) + buttonMore.setImage(UIImage(named: "more")!.image(color: NCBrandColor.shared.iconColor, size: 25), for: .normal) // Gradient gradient.startPoint = CGPoint(x: 0, y: 0.50) @@ -132,12 +132,12 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate func setImageSwitchList() { - buttonSwitch.setImage(UIImage(systemName: "list.bullet")!.image(color: .systemGray, width: 20, height: 15), for: .normal) + buttonSwitch.setImage(UIImage(systemName: "list.bullet")!.image(color: NCBrandColor.shared.iconColor, width: 20, height: 15), for: .normal) } func setImageSwitchGrid() { - buttonSwitch.setImage(UIImage(systemName: "square.grid.2x2")!.image(color: .systemGray, size: 20), for: .normal) + buttonSwitch.setImage(UIImage(systemName: "square.grid.2x2")!.image(color: NCBrandColor.shared.iconColor, size: 20), for: .normal) } func setButtonsView(height: CGFloat) { @@ -297,7 +297,7 @@ class NCSectionFooter: UICollectionReusableView, NCSectionFooterDelegate { super.awakeFromNib() self.backgroundColor = UIColor.clear - labelSection.textColor = UIColor.systemGray + labelSection.textColor = NCBrandColor.shared.iconColor labelSection.text = "" separator.backgroundColor = .separator diff --git a/iOSClient/Menu/NCSortMenu.swift b/iOSClient/Menu/NCSortMenu.swift index df3941aff6..43580c169f 100644 --- a/iOSClient/Menu/NCSortMenu.swift +++ b/iOSClient/Menu/NCSortMenu.swift @@ -47,10 +47,10 @@ class NCSortMenu: NSObject { if layoutForView.ascending { title = NSLocalizedString("_order_by_name_z_a_", comment: "") - icon = UIImage(named: "sortFileNameZA")!.image(color: UIColor.systemGray, size: 50) + icon = UIImage(named: "sortFileNameZA")!.image(color: NCBrandColor.shared.iconColor, size: 50) } else { title = NSLocalizedString("_order_by_name_a_z_", comment: "") - icon = UIImage(named: "sortFileNameAZ")!.image(color: UIColor.systemGray, size: 50) + icon = UIImage(named: "sortFileNameAZ")!.image(color: NCBrandColor.shared.iconColor, size: 50) } actions.append( @@ -69,10 +69,10 @@ class NCSortMenu: NSObject { if layoutForView.ascending { title = NSLocalizedString("_order_by_date_more_recent_", comment: "") - icon = UIImage(named: "sortDateMoreRecent")!.image(color: UIColor.systemGray, size: 50) + icon = UIImage(named: "sortDateMoreRecent")!.image(color: NCBrandColor.shared.iconColor, size: 50) } else { title = NSLocalizedString("_order_by_date_less_recent_", comment: "") - icon = UIImage(named: "sortDateLessRecent")!.image(color: UIColor.systemGray, size: 50) + icon = UIImage(named: "sortDateLessRecent")!.image(color: NCBrandColor.shared.iconColor, size: 50) } actions.append( @@ -91,10 +91,10 @@ class NCSortMenu: NSObject { if layoutForView.ascending { title = NSLocalizedString("_order_by_size_largest_", comment: "") - icon = UIImage(named: "sortLargest")!.image(color: UIColor.systemGray, size: 50) + icon = UIImage(named: "sortLargest")!.image(color: NCBrandColor.shared.iconColor, size: 50) } else { title = NSLocalizedString("_order_by_size_smallest_", comment: "") - icon = UIImage(named: "sortSmallest")!.image(color: UIColor.systemGray, size: 50) + icon = UIImage(named: "sortSmallest")!.image(color: NCBrandColor.shared.iconColor, size: 50) } actions.append( @@ -115,7 +115,7 @@ class NCSortMenu: NSObject { actions.append( NCMenuAction( title: NSLocalizedString("_directory_on_top_no_", comment: ""), - icon: UIImage(named: "foldersOnTop")!.image(color: UIColor.systemGray, size: 50), + icon: UIImage(named: "foldersOnTop")!.image(color: NCBrandColor.shared.iconColor, size: 50), selected: layoutForView.directoryOnTop, on: layoutForView.directoryOnTop, action: { _ in diff --git a/iOSClient/Offline/NCOffline.swift b/iOSClient/Offline/NCOffline.swift index 54832c01b4..c7c9f9d6b6 100644 --- a/iOSClient/Offline/NCOffline.swift +++ b/iOSClient/Offline/NCOffline.swift @@ -36,7 +36,7 @@ class NCOffline: NCCollectionViewCommon { enableSearchBar = false headerMenuButtonsView = true headerRichWorkspaceDisable = true - emptyImage = UIImage(named: "folder")?.image(color: NCBrandColor.shared.brandElement, size: UIScreen.main.bounds.width) + emptyImage = UIImage(named: "folder") emptyTitle = "_files_no_files_" emptyDescription = "_tutorial_offline_view_" } diff --git a/iOSClient/Viewer/NCViewerProviderContextMenu.swift b/iOSClient/Viewer/NCViewerProviderContextMenu.swift index d5d12f6dea..33f995e343 100644 --- a/iOSClient/Viewer/NCViewerProviderContextMenu.swift +++ b/iOSClient/Viewer/NCViewerProviderContextMenu.swift @@ -51,10 +51,10 @@ class NCViewerProviderContextMenu: UIViewController { if metadata.directory { - var imageFolder = UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: sizeIcon * 2) + var imageFolder = UIImage(named: "folder")! if let image = self.image { - imageFolder = image.image(color: NCBrandColor.shared.brandElement, size: sizeIcon * 2) + imageFolder = image } imageView.image = imageFolder.colorizeFolder(metadata: metadata)