marinofaggiana 3 years ago
parent
commit
be1b8b5beb

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

@@ -403,6 +403,35 @@ extension NCCollectionViewCommon {
             )
         )
         
+        //
+        // OPEN IN
+        //
+        actions.append(
+            NCMenuAction(
+                title: NSLocalizedString("_open_in_", comment: ""),
+                icon: NCUtility.shared.loadImage(named: "square.and.arrow.up"),
+                action: { menuAction in
+                    for ocId in selectOcId {
+                        if let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) {
+                            
+                                
+                            if !CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
+                                NCNetworking.shared.download(metadata: metadata, selector: NCGlobal.shared.selectorOpenIn) { errorCode in
+                                    
+                                }
+                            }
+                                
+                            
+                        }
+                    }
+                    self.tapSelect(sender: self)
+                    
+                    //NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorOpenIn)
+                }
+            )
+        )
+        
+        
         //
         // SAVE TO PHOTO GALLERY
         //

+ 2 - 1
iOSClient/Security/NCViewCertificateDetails.storyboard

@@ -31,6 +31,7 @@
                                         <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
                                     </textView>
                                 </subviews>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                 <constraints>
                                     <constraint firstItem="WsH-pm-r11" firstAttribute="leading" secondItem="IrK-3z-fms" secondAttribute="leading" id="JjL-uK-kjZ"/>
                                     <constraint firstAttribute="bottom" secondItem="WsH-pm-r11" secondAttribute="bottom" id="liC-tc-sE8"/>
@@ -42,7 +43,7 @@
                                 </connections>
                             </scrollView>
                         </subviews>
-                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="IrK-3z-fms" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="07j-i7-RvO"/>
                             <constraint firstItem="IrK-3z-fms" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="2nE-Io-hbo"/>