Эх сурвалжийг харах

VIEW IN FOLDER

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 жил өмнө
parent
commit
665a7c9959

+ 16 - 0
iOSClient/Menu/NCCollectionViewCommon+Menu.swift

@@ -121,6 +121,22 @@ extension NCCollectionViewCommon {
             )
             )
         }
         }
 
 
+        //
+        // VIEW IN FOLDER
+        //
+        if layoutKey != NCGlobal.shared.layoutViewFiles {
+            actions.append(
+                NCMenuAction(
+                    title: NSLocalizedString("_view_in_folder_", comment: ""),
+                    icon: NCUtility.shared.loadImage(named: "questionmark.folder"),
+                    order: 21,
+                    action: { menuAction in
+                        NCActionCenter.shared.openFileViewInFolder(serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName, fileNameOpen: nil)
+                    }
+                )
+            )
+        }
+
         //
         //
         // LOCK / UNLOCK
         // LOCK / UNLOCK
         //
         //

+ 3 - 1
iOSClient/Menu/NCContextMenu.swift

@@ -90,7 +90,7 @@ class NCContextMenu: NSObject {
         }
         }
 
 
         let viewInFolder = UIAction(title: NSLocalizedString("_view_in_folder_", comment: ""),
         let viewInFolder = UIAction(title: NSLocalizedString("_view_in_folder_", comment: ""),
-                                    image: UIImage(systemName: "arrow.forward.square")) { _ in
+                                    image: UIImage(systemName: "questionmark.folder")) { _ in
             NCActionCenter.shared.openFileViewInFolder(serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName, fileNameOpen: nil)
             NCActionCenter.shared.openFileViewInFolder(serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName, fileNameOpen: nil)
         }
         }
 
 
@@ -120,10 +120,12 @@ class NCContextMenu: NSObject {
             }
             }
         }
         }
 
 
+        /*
         let copy = UIAction(title: NSLocalizedString("_copy_file_", comment: ""),
         let copy = UIAction(title: NSLocalizedString("_copy_file_", comment: ""),
                             image: UIImage(systemName: "doc.on.doc")) { _ in
                             image: UIImage(systemName: "doc.on.doc")) { _ in
             NCActionCenter.shared.copyPasteboard(pasteboardOcIds: [metadata.ocId], hudView: viewController.view)
             NCActionCenter.shared.copyPasteboard(pasteboardOcIds: [metadata.ocId], hudView: viewController.view)
         }
         }
+        */
 
 
         let modify = UIAction(title: NSLocalizedString("_modify_", comment: ""),
         let modify = UIAction(title: NSLocalizedString("_modify_", comment: ""),
                               image: UIImage(systemName: "pencil.tip.crop.circle")) { _ in
                               image: UIImage(systemName: "pencil.tip.crop.circle")) { _ in

+ 15 - 15
iOSClient/Menu/NCViewer+Menu.swift

@@ -52,6 +52,21 @@ extension NCViewer {
             )
             )
         }
         }
 
 
+        //
+        // VIEW IN FOLDER
+        //
+        if !webView {
+            actions.append(
+                NCMenuAction(
+                    title: NSLocalizedString("_view_in_folder_", comment: ""),
+                    icon: NCUtility.shared.loadImage(named: "questionmark.folder"),
+                    action: { menuAction in
+                        NCActionCenter.shared.openFileViewInFolder(serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName, fileNameOpen: nil)
+                    }
+                )
+            )
+        }
+
         //
         //
         // FAVORITE
         // FAVORITE
         // Workaround: PROPPATCH doesn't work
         // Workaround: PROPPATCH doesn't work
@@ -190,21 +205,6 @@ extension NCViewer {
             actions.append(.copyAction(selectOcId: [metadata.ocId], hudView: viewController.view))
             actions.append(.copyAction(selectOcId: [metadata.ocId], hudView: viewController.view))
         }
         }
 
 
-        //
-        // VIEW IN FOLDER
-        //
-        if !webView {
-            actions.append(
-                NCMenuAction(
-                    title: NSLocalizedString("_view_in_folder_", comment: ""),
-                    icon: NCUtility.shared.loadImage(named: "arrow.forward.square"),
-                    action: { menuAction in
-                        NCActionCenter.shared.openFileViewInFolder(serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName, fileNameOpen: nil)
-                    }
-                )
-            )
-        }
-
         //
         //
         // DOWNLOAD IMAGE MAX RESOLUTION
         // DOWNLOAD IMAGE MAX RESOLUTION
         //
         //

+ 2 - 2
iOSClient/Settings/NCEndToEndInitialize.swift

@@ -53,14 +53,14 @@ class NCEndToEndInitialize: NSObject {
 
 
     @objc func statusOfService(completion: @escaping (_ error: NKError?) -> Void) {
     @objc func statusOfService(completion: @escaping (_ error: NKError?) -> Void) {
 
 
-        NextcloudKit.shared.getE2EECertificate { account, certificate, data, error in
+        NextcloudKit.shared.getE2EECertificate { _, _, _, _, error in
             completion(error)
             completion(error)
         }
         }
     }
     }
 
 
     func getPublicKey() {
     func getPublicKey() {
 
 
-        NextcloudKit.shared.getE2EECertificate { account, certificate, data, error in
+        NextcloudKit.shared.getE2EECertificate { account, certificate, _, _, error in
 
 
             if error == .success && account == self.appDelegate.account {
             if error == .success && account == self.appDelegate.account {