Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 49 additions & 3 deletions iOSClient/Menu/NCViewer+Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""),
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -162,6 +203,11 @@ extension NCViewer {
)
)
}
// COPY IN PASTEBOARD
//
if !webView, metadata.isCopyableInPasteboard, !metadata.isDirectoryE2EE {
actions.append(.copyAction(selectOcId: [metadata.ocId]))
}

//
// PDF
Expand Down