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 @@
// 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 @@
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 @@
)
)
}

//
// SAVE CAMERA ROLL
//
if !webView, metadata.isSavebleInCameraRoll {
actions.append(.saveMediaAction(selectedMediaMetadatas: [metadata]))

Check failure on line 151 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

type 'NCMenuAction' has no member 'saveMediaAction'

Check failure on line 151 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

type 'NCMenuAction' has no member 'saveMediaAction'
}


//
// 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 {

Check failure on line 165 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

cannot find type 'NCRenameFile' in scope

Check failure on line 165 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

cannot find type 'NCRenameFile' in scope

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)

Check failure on line 174 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

cannot find 'viewController' in scope

Check failure on line 174 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

cannot find 'viewController' in scope
}
}
)
)
}

//
// COPY - MOVE
//
if !webView, metadata.isCopyableMovable {
actions.append(.moveOrCopyAction(selectedMetadatas: [metadata], viewController: viewController, indexPath: []))

Check failure on line 185 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

cannot find 'viewController' in scope

Check failure on line 185 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

no exact matches in call to instance method 'append'

Check failure on line 185 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

type 'Sequence' has no member 'moveOrCopyAction'

Check failure on line 185 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

cannot find 'viewController' in scope

Check failure on line 185 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

no exact matches in call to instance method 'append'

Check failure on line 185 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

type 'Sequence' has no member 'moveOrCopyAction'
}

//
// DOWNLOAD - LOCAL
Expand Down Expand Up @@ -172,6 +213,11 @@
)
)
}
// COPY IN PASTEBOARD
//
if !webView, metadata.isCopyableInPasteboard, !metadata.isDirectoryE2EE {
actions.append(.copyAction(selectOcId: [metadata.ocId]))

Check failure on line 219 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

type 'NCMenuAction' has no member 'copyAction'

Check failure on line 219 in iOSClient/Menu/NCViewer+Menu.swift

View workflow job for this annotation

GitHub Actions / Build and Test

type 'NCMenuAction' has no member 'copyAction'
}

//
// PDF
Expand Down
Loading