diff --git a/iOSClient/Menu/NCViewer+Menu.swift b/iOSClient/Menu/NCViewer+Menu.swift index 2906ef9a83..7ddbae05d2 100644 --- a/iOSClient/Menu/NCViewer+Menu.swift +++ b/iOSClient/Menu/NCViewer+Menu.swift @@ -67,7 +67,7 @@ extension NCViewer { // FAVORITE // Workaround: PROPPATCH doesn't work // https://github.com/nextcloud/files_lock/issues/68 - if !metadata.lock { + if !metadata.lock, !metadata.isDirectoryE2EE{ actions.append( NCMenuAction( title: metadata.favorite ? NSLocalizedString("_remove_favorites_", comment: "") : NSLocalizedString("_add_favorites_", comment: ""), @@ -96,9 +96,9 @@ extension NCViewer { if !webView, metadata.canShare { actions.append(.share(selectedMetadatas: [metadata], controller: controller)) } - + // - // SAVE LIVE PHOTO + // PRINT // if let metadataMOV = self.database.getMetadataLivePhoto(metadata: metadata), let hudView = controller.view { @@ -143,6 +143,47 @@ extension NCViewer { ) ) } + + // + // SAVE CAMERA ROLL + // + if !webView, metadata.isSavebleInCameraRoll { + actions.append(.saveMediaAction(selectedMediaMetadatas: [metadata])) + } + + + // + // RENAME + // + if !webView, metadata.isRenameable, !metadata.isDirectoryE2EE { + actions.append( + NCMenuAction( + title: NSLocalizedString("_rename_", comment: ""), + icon: utility.loadImage(named: "text.cursor", colors: [NCBrandColor.shared.iconImageColor]), + action: { _ in + + if let vcRename = UIStoryboard(name: "NCRenameFile", bundle: nil).instantiateInitialViewController() as? NCRenameFile { + + vcRename.metadata = metadata + vcRename.disableChangeExt = true + vcRename.imagePreview = imageIcon + vcRename.indexPath = indexPath + + let popup = NCPopupViewController(contentController: vcRename, popupWidth: vcRename.width, popupHeight: vcRename.height) + + viewController.present(popup, animated: true) + } + } + ) + ) + } + + // + // COPY - MOVE + // + if !webView, metadata.isCopyableMovable { + actions.append(.moveOrCopyAction(selectedMetadatas: [metadata], viewController: viewController, indexPath: [])) + } // // DOWNLOAD FULL RESOLUTION @@ -162,6 +203,11 @@ extension NCViewer { ) ) } + // COPY IN PASTEBOARD + // + if !webView, metadata.isCopyableInPasteboard, !metadata.isDirectoryE2EE { + actions.append(.copyAction(selectOcId: [metadata.ocId])) + } // // PDF