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

Remove old share MenuViews

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 жил өмнө
parent
commit
667773fd96

+ 4 - 28
Nextcloud.xcodeproj/project.pbxproj

@@ -45,12 +45,12 @@
 		AF4BF61F27562B3F0081CEEF /* NCManageDatabase+Activity.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF4BF61D27562B3F0081CEEF /* NCManageDatabase+Activity.swift */; };
 		AF4BF62027562B3F0081CEEF /* NCManageDatabase+Activity.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF4BF61D27562B3F0081CEEF /* NCManageDatabase+Activity.swift */; };
 		AF4BF62127562B3F0081CEEF /* NCManageDatabase+Activity.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF4BF61D27562B3F0081CEEF /* NCManageDatabase+Activity.swift */; };
+		AF56C1DC2784856200D8BAE2 /* NCActivityCommentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AF56C1DB2784856200D8BAE2 /* NCActivityCommentView.xib */; };
 		AF68326A27BE65A90010BF0B /* NCMenuAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF68326927BE65A90010BF0B /* NCMenuAction.swift */; };
+		AF730AF827834B1400B7520E /* NCShare+NCCellDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF730AF727834B1400B7520E /* NCShare+NCCellDelegate.swift */; };
 		AF730AFA27843E4C00B7520E /* NCShareExtension+NCDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF730AF927843E4C00B7520E /* NCShareExtension+NCDelegate.swift */; };
 		AF7E504E27A2D8FF00B5E4AF /* UIBarButton+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E504D27A2D8FF00B5E4AF /* UIBarButton+Extension.swift */; };
 		AF7E505027A2D92300B5E4AF /* NCSelectableNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E504F27A2D92300B5E4AF /* NCSelectableNavigationView.swift */; };
-		AF56C1DC2784856200D8BAE2 /* NCActivityCommentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AF56C1DB2784856200D8BAE2 /* NCActivityCommentView.xib */; };
-		AF730AF827834B1400B7520E /* NCShare+NCCellDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF730AF727834B1400B7520E /* NCShare+NCCellDelegate.swift */; };
 		AF817EF1274BC781009ED85B /* NCUserBaseUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF817EF0274BC781009ED85B /* NCUserBaseUrl.swift */; };
 		AF817EF2274BC781009ED85B /* NCUserBaseUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF817EF0274BC781009ED85B /* NCUserBaseUrl.swift */; };
 		AF817EF3274BC781009ED85B /* NCUserBaseUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF817EF0274BC781009ED85B /* NCUserBaseUrl.swift */; };
@@ -225,10 +225,7 @@
 		F76673F022C90434007ED366 /* FileProviderUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76673EF22C90433007ED366 /* FileProviderUtility.swift */; };
 		F7682FE023C36B0500983A04 /* NCMainTabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7682FDF23C36B0500983A04 /* NCMainTabBar.swift */; };
 		F769453C22E9CFFF000A798A /* NCShareUserCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F769453B22E9CFFF000A798A /* NCShareUserCell.xib */; };
-		F769453E22E9E97E000A798A /* NCShareUserMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F769453D22E9E97D000A798A /* NCShareUserMenuView.xib */; };
 		F769454022E9F077000A798A /* NCSharePaging.swift in Sources */ = {isa = PBXBuildFile; fileRef = F769453F22E9F077000A798A /* NCSharePaging.swift */; };
-		F769454222E9F0EE000A798A /* NCShareLinkMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F769454122E9F0EE000A798A /* NCShareLinkMenuView.swift */; };
-		F769454422E9F142000A798A /* NCShareUserMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F769454322E9F142000A798A /* NCShareUserMenuView.swift */; };
 		F769454622E9F1B0000A798A /* NCShareCommon.swift in Sources */ = {isa = PBXBuildFile; fileRef = F769454522E9F1B0000A798A /* NCShareCommon.swift */; };
 		F769454822E9F20D000A798A /* NCShareNetworking.swift in Sources */ = {isa = PBXBuildFile; fileRef = F769454722E9F20D000A798A /* NCShareNetworking.swift */; };
 		F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
@@ -305,8 +302,6 @@
 		F78F74342163757000C2ADAD /* NCTrash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F78F74332163757000C2ADAD /* NCTrash.storyboard */; };
 		F78F74362163781100C2ADAD /* NCTrash.swift in Sources */ = {isa = PBXBuildFile; fileRef = F78F74352163781100C2ADAD /* NCTrash.swift */; };
 		F790110E21415BF600D7B136 /* NCViewerRichdocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = F790110D21415BF600D7B136 /* NCViewerRichdocument.swift */; };
-		F79728D422F96F2E003CACA7 /* NCShareLinkFolderMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F79728D322F96F2D003CACA7 /* NCShareLinkFolderMenuView.xib */; };
-		F79728D622F9A0B1003CACA7 /* NCShareUserFolderMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F79728D522F9A0B0003CACA7 /* NCShareUserFolderMenuView.xib */; };
 		F798F0E225880608000DAFFD /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70CEF5523E9C7E50007035B /* UIColor+Extensions.swift */; };
 		F798F0E725880609000DAFFD /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70CEF5523E9C7E50007035B /* UIColor+Extensions.swift */; };
 		F798F0EC2588060A000DAFFD /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70CEF5523E9C7E50007035B /* UIColor+Extensions.swift */; };
@@ -362,7 +357,6 @@
 		F7D57C8B26317BDE00DE301D /* NCAccountRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7CA212B25F1333200826ABB /* NCAccountRequest.swift */; };
 		F7D96FCC246ED7E200536D73 /* NCNetworkingCheckRemoteUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7D96FCB246ED7E100536D73 /* NCNetworkingCheckRemoteUser.swift */; };
 		F7DBC37C23325E02001A85BA /* NCAppConfigView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7DBC37B23325E01001A85BA /* NCAppConfigView.swift */; };
-		F7DFAA8A22E22EF100FC4527 /* NCShareLinkMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7DFAA8922E22EF100FC4527 /* NCShareLinkMenuView.xib */; };
 		F7DFB7F0219C5B8000680748 /* NCCreateFormUploadAssets.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7DFB7EF219C5B8000680748 /* NCCreateFormUploadAssets.swift */; };
 		F7DFB7F4219C5CA800680748 /* NCCreateFormUploadScanDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7DFB7F3219C5CA800680748 /* NCCreateFormUploadScanDocument.swift */; };
 		F7E0CDCF265CE8610044854E /* NCUserStatus.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7E0CDCE265CE8610044854E /* NCUserStatus.storyboard */; };
@@ -500,12 +494,12 @@
 		AF4BF613275629E20081CEEF /* NCManageDatabase+Account.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCManageDatabase+Account.swift"; sourceTree = "<group>"; };
 		AF4BF61827562A4B0081CEEF /* NCManageDatabase+Metadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCManageDatabase+Metadata.swift"; sourceTree = "<group>"; };
 		AF4BF61D27562B3F0081CEEF /* NCManageDatabase+Activity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCManageDatabase+Activity.swift"; sourceTree = "<group>"; };
+		AF56C1DB2784856200D8BAE2 /* NCActivityCommentView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCActivityCommentView.xib; sourceTree = "<group>"; };
 		AF68326927BE65A90010BF0B /* NCMenuAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCMenuAction.swift; sourceTree = "<group>"; };
+		AF730AF727834B1400B7520E /* NCShare+NCCellDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCShare+NCCellDelegate.swift"; sourceTree = "<group>"; };
 		AF730AF927843E4C00B7520E /* NCShareExtension+NCDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCShareExtension+NCDelegate.swift"; sourceTree = "<group>"; };
 		AF7E504D27A2D8FF00B5E4AF /* UIBarButton+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIBarButton+Extension.swift"; sourceTree = "<group>"; };
 		AF7E504F27A2D92300B5E4AF /* NCSelectableNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCSelectableNavigationView.swift; sourceTree = "<group>"; };
-		AF56C1DB2784856200D8BAE2 /* NCActivityCommentView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCActivityCommentView.xib; sourceTree = "<group>"; };
-		AF730AF727834B1400B7520E /* NCShare+NCCellDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCShare+NCCellDelegate.swift"; sourceTree = "<group>"; };
 		AF817EF0274BC781009ED85B /* NCUserBaseUrl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCUserBaseUrl.swift; sourceTree = "<group>"; };
 		AF8ED1F92757821000B8DBC4 /* NextcloudTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NextcloudTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
 		AF8ED1FB2757821000B8DBC4 /* NextcloudTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NextcloudTests.swift; sourceTree = "<group>"; };
@@ -710,10 +704,7 @@
 		F76673EF22C90433007ED366 /* FileProviderUtility.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileProviderUtility.swift; sourceTree = "<group>"; };
 		F7682FDF23C36B0500983A04 /* NCMainTabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCMainTabBar.swift; sourceTree = "<group>"; };
 		F769453B22E9CFFF000A798A /* NCShareUserCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCShareUserCell.xib; sourceTree = "<group>"; };
-		F769453D22E9E97D000A798A /* NCShareUserMenuView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCShareUserMenuView.xib; sourceTree = "<group>"; };
 		F769453F22E9F077000A798A /* NCSharePaging.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCSharePaging.swift; sourceTree = "<group>"; };
-		F769454122E9F0EE000A798A /* NCShareLinkMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCShareLinkMenuView.swift; sourceTree = "<group>"; };
-		F769454322E9F142000A798A /* NCShareUserMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCShareUserMenuView.swift; sourceTree = "<group>"; };
 		F769454522E9F1B0000A798A /* NCShareCommon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCShareCommon.swift; sourceTree = "<group>"; };
 		F769454722E9F20D000A798A /* NCShareNetworking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCShareNetworking.swift; sourceTree = "<group>"; };
 		F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCBrand.swift; sourceTree = "<group>"; };
@@ -783,8 +774,6 @@
 		F78F74352163781100C2ADAD /* NCTrash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCTrash.swift; sourceTree = "<group>"; };
 		F790110D21415BF600D7B136 /* NCViewerRichdocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCViewerRichdocument.swift; sourceTree = "<group>"; };
 		F79018A424092EF4007C9B6D /* ATGMediaBrowser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ATGMediaBrowser.framework; path = Carthage/Build/iOS/ATGMediaBrowser.framework; sourceTree = "<group>"; };
-		F79728D322F96F2D003CACA7 /* NCShareLinkFolderMenuView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCShareLinkFolderMenuView.xib; sourceTree = "<group>"; };
-		F79728D522F9A0B0003CACA7 /* NCShareUserFolderMenuView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCShareUserFolderMenuView.xib; sourceTree = "<group>"; };
 		F79918A021997F9000C2E308 /* UICKeyChainStore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UICKeyChainStore.framework; path = Carthage/Build/iOS/UICKeyChainStore.framework; sourceTree = "<group>"; };
 		F79918A72199840500C2E308 /* Sheeeeeeeeet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sheeeeeeeeet.framework; path = Carthage/Build/iOS/Sheeeeeeeeet.framework; sourceTree = "<group>"; };
 		F79A65C22191D90F00FF6DCC /* NCSelect.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCSelect.storyboard; sourceTree = "<group>"; };
@@ -903,7 +892,6 @@
 		F7DBC37B23325E01001A85BA /* NCAppConfigView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCAppConfigView.swift; sourceTree = "<group>"; };
 		F7DBD82B23E46A4700ECB7C6 /* MarkdownKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MarkdownKit.framework; path = Carthage/Build/iOS/MarkdownKit.framework; sourceTree = "<group>"; };
 		F7DE9AB01F482FA5008DFE10 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; };
-		F7DFAA8922E22EF100FC4527 /* NCShareLinkMenuView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCShareLinkMenuView.xib; sourceTree = "<group>"; };
 		F7DFB7EF219C5B8000680748 /* NCCreateFormUploadAssets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCCreateFormUploadAssets.swift; sourceTree = "<group>"; };
 		F7DFB7F3219C5CA800680748 /* NCCreateFormUploadScanDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCCreateFormUploadScanDocument.swift; sourceTree = "<group>"; };
 		F7E0CDCE265CE8610044854E /* NCUserStatus.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCUserStatus.storyboard; sourceTree = "<group>"; };
@@ -1202,18 +1190,12 @@
 				F73CB3B122E072A000AD728E /* NCShareHeaderView.xib */,
 				F787704E22E7019900F287A9 /* NCShareLinkCell.xib */,
 				AF2D7C7B2742556F00ADF566 /* NCShareLinkCell.swift */,
-				F7DFAA8922E22EF100FC4527 /* NCShareLinkMenuView.xib */,
-				F769454122E9F0EE000A798A /* NCShareLinkMenuView.swift */,
 				F769454722E9F20D000A798A /* NCShareNetworking.swift */,
 				F769453F22E9F077000A798A /* NCSharePaging.swift */,
 				F77EFC0B26D6751F00806ED6 /* NCShareQuickStatusMenu.swift */,
 				F774264822EB4D0000B23912 /* NCSearchUserDropDownCell.xib */,
 				F769453B22E9CFFF000A798A /* NCShareUserCell.xib */,
 				AF2D7C7D2742559100ADF566 /* NCShareUserCell.swift */,
-				F79728D322F96F2D003CACA7 /* NCShareLinkFolderMenuView.xib */,
-				F79728D522F9A0B0003CACA7 /* NCShareUserFolderMenuView.xib */,
-				F769453D22E9E97D000A798A /* NCShareUserMenuView.xib */,
-				F769454322E9F142000A798A /* NCShareUserMenuView.swift */,
 			);
 			path = Share;
 			sourceTree = "<group>";
@@ -2252,7 +2234,6 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F79728D422F96F2E003CACA7 /* NCShareLinkFolderMenuView.xib in Resources */,
 				F7362A1F220C853A005101B5 /* LaunchScreen.storyboard in Resources */,
 				F77444F622281649000D5EB0 /* NCGridMediaCell.xib in Resources */,
 				F78ACD4421903CF20088454D /* NCListCell.xib in Resources */,
@@ -2291,7 +2272,6 @@
 				F7381EE5218218C9000B1560 /* NCOffline.storyboard in Resources */,
 				F7E0CDCF265CE8610044854E /* NCUserStatus.storyboard in Resources */,
 				F76D3CF32428B94E005DFA87 /* NCViewerPDFSearchCell.xib in Resources */,
-				F769453E22E9E97E000A798A /* NCShareUserMenuView.xib in Resources */,
 				F7CA212E25F1333300826ABB /* NCAccountRequest.storyboard in Resources */,
 				F749C10E23C4A5340027D966 /* NCIntroCollectionViewCell.xib in Resources */,
 				F717402D24F699A5000C87D5 /* NCFavorite.storyboard in Resources */,
@@ -2309,8 +2289,6 @@
 				F7651A8A23A2A3F2001403D2 /* NCCreateFormUploadDocuments.storyboard in Resources */,
 				F7F4F10A27ECDBDB008676F9 /* Inconsolata-ExtraBold.ttf in Resources */,
 				F704B5E72430C06700632F5F /* NCCreateFormUploadConflictCell.xib in Resources */,
-				F79728D622F9A0B1003CACA7 /* NCShareUserFolderMenuView.xib in Resources */,
-				F7DFAA8A22E22EF100FC4527 /* NCShareLinkMenuView.xib in Resources */,
 				F7C9555321F0C4CA0024296E /* NCActivity.storyboard in Resources */,
 				F7BC287E26663F6C004D46C5 /* NCViewCertificateDetails.storyboard in Resources */,
 				F78ACD54219047D40088454D /* NCSectionFooter.xib in Resources */,
@@ -2559,7 +2537,6 @@
 				F72D404923D2082500A97FD0 /* NCViewerNextcloudText.swift in Sources */,
 				F700510522DF6A89003A3356 /* NCShare.swift in Sources */,
 				F72D1007210B6882009C96B7 /* NCPushNotificationEncryption.m in Sources */,
-				F769454222E9F0EE000A798A /* NCShareLinkMenuView.swift in Sources */,
 				F785EE9D246196DF00B3F945 /* NCNetworkingE2EE.swift in Sources */,
 				F76673ED22C901F6007ED366 /* FileProviderDomain.swift in Sources */,
 				F7A321AD1E9E6AD50069AD1B /* CCAdvanced.m in Sources */,
@@ -2607,7 +2584,6 @@
 				F7CA212D25F1333300826ABB /* NCAccountRequest.swift in Sources */,
 				F765F73125237E3F00391DBE /* NCRecent.swift in Sources */,
 				F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */,
-				F769454422E9F142000A798A /* NCShareUserMenuView.swift in Sources */,
 				F7581D2425EFDDDF004DC699 /* NCMedia+Menu.swift in Sources */,
 				F738D4902756740100CD1D38 /* NCLoginNavigationController.swift in Sources */,
 				F77B0E981D118A16002130FE /* CCManageAccount.m in Sources */,

+ 2 - 18
iOSClient/Share/NCShare+NCCellDelegate.swift

@@ -37,24 +37,8 @@ extension NCShare: NCShareLinkCellDelegate, NCShareUserCellDelegate {
         let isFilesSharingPublicPasswordEnforced = NCManageDatabase.shared.getCapabilitiesServerBool(account: metadata.account, elements: NCElementsJSON.shared.capabilitiesFileSharingPubPasswdEnforced, exists: false)
 
         if let tableShare = tableShare {
-            // open share menu
-            if tableShare.shareType == 3 {
-                let views = NCShareCommon.shared.openViewMenuShareLink(shareViewController: self, tableShare: tableShare, metadata: metadata)
-                shareLinkMenuView = views.shareLinkMenuView
-                shareMenuViewWindow = views.viewWindow
-
-                let tap = UITapGestureRecognizer(target: self, action: #selector(tapLinkMenuViewWindow))
-                tap.delegate = self
-                shareMenuViewWindow?.addGestureRecognizer(tap)
-            } else {
-                let views = NCShareCommon.shared.openViewMenuUser(shareViewController: self, tableShare: tableShare, metadata: metadata)
-                shareUserMenuView = views.shareUserMenuView
-                shareMenuViewWindow = views.viewWindow
-
-                let tap = UITapGestureRecognizer(target: self, action: #selector(tapLinkMenuViewWindow))
-                tap.delegate = self
-                shareMenuViewWindow?.addGestureRecognizer(tap)
-            }
+            // TODO: open share menu
+            
         } else if isFilesSharingPublicPasswordEnforced {
             // create share with pw
             let alertController = UIAlertController(title: NSLocalizedString("_enforce_password_protection_", comment: ""), message: "", preferredStyle: .alert)

+ 0 - 10
iOSClient/Share/NCShare.swift

@@ -50,9 +50,6 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareNetworkingD
 
     var shares: (firstShareLink: tableShare?, share: [tableShare]?) = (nil, nil)
 
-    var shareLinkMenuView: NCShareLinkMenuView?
-    var shareUserMenuView: NCShareUserMenuView?
-    var shareMenuViewWindow: UIView?
     private var dropDown = DropDown()
     var networking: NCShareNetworking?
 
@@ -204,13 +201,6 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareNetworkingD
         self.present(alertController, animated: true, completion: nil)
     }
 
-    @objc func tapLinkMenuViewWindow(gesture: UITapGestureRecognizer) {
-        shareLinkMenuView?.unLoad()
-        shareLinkMenuView = nil
-        shareUserMenuView?.unLoad()
-        shareUserMenuView = nil
-    }
-
     func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
         return gestureRecognizer.view == touch.view
     }

+ 0 - 120
iOSClient/Share/NCShareCommon.swift

@@ -56,126 +56,6 @@ class NCShareCommon: NSObject {
         return image
     }
 
-    func openViewMenuShareLink(shareViewController: NCShare, tableShare: tableShare?, metadata: tableMetadata) -> (shareLinkMenuView: NCShareLinkMenuView, viewWindow: UIView) {
-
-        var shareLinkMenuView: NCShareLinkMenuView
-        let window = UIApplication.shared.keyWindow!
-        let viewWindow = UIView(frame: window.bounds)
-
-        window.addSubview(viewWindow)
-        viewWindow.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-
-        if metadata.directory {
-            shareLinkMenuView = Bundle.main.loadNibNamed("NCShareLinkFolderMenuView", owner: self, options: nil)?.first as! NCShareLinkMenuView
-        } else {
-            shareLinkMenuView = Bundle.main.loadNibNamed("NCShareLinkMenuView", owner: self, options: nil)?.first as! NCShareLinkMenuView
-        }
-
-        shareLinkMenuView.width = 250
-        if metadata.directory {
-            shareLinkMenuView.height = 600
-        } else {
-            shareLinkMenuView.height = 500
-        }
-
-        shareLinkMenuView.backgroundColor = NCBrandColor.shared.systemBackground
-        shareLinkMenuView.metadata = metadata
-        shareLinkMenuView.viewWindow = viewWindow
-        shareLinkMenuView.shareViewController = shareViewController
-        shareLinkMenuView.reloadData(idShare: tableShare?.idShare ?? 0)
-        shareLinkMenuView.translatesAutoresizingMaskIntoConstraints = false
-        viewWindow.addSubview(shareLinkMenuView)
-
-        NSLayoutConstraint.activate([
-            shareLinkMenuView.widthAnchor.constraint(equalToConstant: shareLinkMenuView.width),
-            shareLinkMenuView.heightAnchor.constraint(equalToConstant: shareLinkMenuView.height),
-            shareLinkMenuView.centerXAnchor.constraint(equalTo: viewWindow.centerXAnchor),
-            shareLinkMenuView.centerYAnchor.constraint(equalTo: viewWindow.centerYAnchor)
-        ])
-
-        return(shareLinkMenuView: shareLinkMenuView, viewWindow: viewWindow)
-    }
-
-    func openViewMenuUser(shareViewController: NCShare, tableShare: tableShare?, metadata: tableMetadata) -> (shareUserMenuView: NCShareUserMenuView, viewWindow: UIView) {
-
-        var shareUserMenuView: NCShareUserMenuView
-        let window = UIApplication.shared.keyWindow!
-        let viewWindow = UIView(frame: window.bounds)
-
-        window.addSubview(viewWindow)
-        viewWindow.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-
-        if metadata.directory {
-            shareUserMenuView = Bundle.main.loadNibNamed("NCShareUserFolderMenuView", owner: self, options: nil)?.first as! NCShareUserMenuView
-        } else {
-            shareUserMenuView = Bundle.main.loadNibNamed("NCShareUserMenuView", owner: self, options: nil)?.first as! NCShareUserMenuView
-        }
-
-        shareUserMenuView.width = 250
-        if metadata.directory {
-            shareUserMenuView.height = 420
-        } else {
-            shareUserMenuView.height = 270
-        }
-
-        shareUserMenuView.backgroundColor = NCBrandColor.shared.systemBackground
-        shareUserMenuView.metadata = metadata
-        shareUserMenuView.viewWindow = viewWindow
-        shareUserMenuView.shareViewController = shareViewController
-        shareUserMenuView.reloadData(idShare: tableShare?.idShare ?? 0)
-        shareUserMenuView.translatesAutoresizingMaskIntoConstraints = false
-        viewWindow.addSubview(shareUserMenuView)
-
-        NSLayoutConstraint.activate([
-            shareUserMenuView.widthAnchor.constraint(equalToConstant: shareUserMenuView.width),
-            shareUserMenuView.heightAnchor.constraint(equalToConstant: shareUserMenuView.height),
-            shareUserMenuView.centerXAnchor.constraint(equalTo: viewWindow.centerXAnchor),
-            shareUserMenuView.centerYAnchor.constraint(equalTo: viewWindow.centerYAnchor)
-        ])
-
-        return(shareUserMenuView: shareUserMenuView, viewWindow: viewWindow)
-    }
-
-    func openCalendar(view: UIView, width: CGFloat, height: CGFloat) -> (calendarView: FSCalendar, viewWindow: UIView) {
-
-        let globalPoint = view.superview?.convert(view.frame.origin, to: nil)
-
-        let window = UIApplication.shared.keyWindow!
-        let viewWindow = UIView(frame: window.bounds)
-        window.addSubview(viewWindow)
-
-        let calendar = FSCalendar(frame: CGRect(x: globalPoint!.x + 10, y: globalPoint!.y + 10, width: width - 20, height: 300))
-
-        if #available(iOS 13.0, *) {
-            calendar.appearance.headerTitleColor = .label
-        } else {
-            calendar.appearance.headerTitleColor = .black
-        }
-        calendar.backgroundColor = NCBrandColor.shared.systemBackground
-        calendar.placeholderType = .none
-        calendar.appearance.headerMinimumDissolvedAlpha = 0.0
-
-        calendar.layer.borderColor = UIColor.lightGray.cgColor
-        calendar.layer.borderWidth = 0.5
-        calendar.layer.masksToBounds = false
-        calendar.layer.cornerRadius = 5
-        calendar.layer.masksToBounds = false
-        calendar.layer.shadowOffset = CGSize(width: 2, height: 2)
-        calendar.layer.shadowOpacity = 0.2
-
-        calendar.appearance.headerTitleFont = UIFont.systemFont(ofSize: 13)
-
-        calendar.appearance.weekdayTextColor = NCBrandColor.shared.gray
-        calendar.appearance.weekdayFont = UIFont.systemFont(ofSize: 13)
-
-        calendar.appearance.todayColor = NCBrandColor.shared.brandElement
-        calendar.appearance.titleFont = UIFont.systemFont(ofSize: 13)
-
-        viewWindow.addSubview(calendar)
-
-        return(calendarView: calendar, viewWindow: viewWindow)
-    }
-
     func copyLink(link: String, viewController: UIViewController, sender: Any) {
         let objectsToShare = [link]
 

+ 0 - 318
iOSClient/Share/NCShareLinkFolderMenuView.xib

@@ -1,318 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
-    <device id="retina4_0" orientation="portrait" appearance="light"/>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view opaque="NO" contentMode="scaleToFill" id="iN0-l3-epB" customClass="NCShareLinkMenuView" customModule="Nextcloud" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="250" height="600"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="sjf-wF-y07" userLabel="SwitchAllowEditing">
-                    <rect key="frame" x="10" y="62" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchReadOnlyWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="IZJ-Hz-NxB"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Read only" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IHP-P8-rm2">
-                    <rect key="frame" x="70" y="70" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="lcS-7f-bEg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="UIn-eq-hkP">
-                    <rect key="frame" x="10" y="215" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchHideDownloadChangedWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="ZUj-2h-gQC"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hide download" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KXo-cP-gkc">
-                    <rect key="frame" x="70" y="223" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="IEP-cO-Um6"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="HDO-WC-RvJ">
-                    <rect key="frame" x="10" y="266" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchPasswordProtectChangedWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="wGL-du-81Q"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Password protect" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HaY-OM-mQh">
-                    <rect key="frame" x="70" y="274" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="MeH-bs-tZK"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="e1F-PV-32s">
-                    <rect key="frame" x="70" y="299" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="tTv-8w-kxm"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits" secureTextEntry="YES" textContentType="password"/>
-                    <connections>
-                        <action selector="fieldPasswordProtectDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="2PO-wf-bHs"/>
-                    </connections>
-                </textField>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="dB8-1M-WZr">
-                    <rect key="frame" x="10" y="349" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="26x-ld-Jsj"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Set expiration date" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qll-9F-4DA">
-                    <rect key="frame" x="70" y="357" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="KyU-PL-PRI"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ymk-0u-ddH">
-                    <rect key="frame" x="70" y="382" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="G4f-LN-v7k"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="editingDidBegin" id="5Ou-k5-UM5"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="file_txt" translatesAutoresizingMaskIntoConstraints="NO" id="F4T-wQ-tBU">
-                    <rect key="frame" x="13" y="432" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="7uC-w2-XPl"/>
-                        <constraint firstAttribute="width" constant="25" id="YkI-0i-Hbj"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Note to recipient" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="grT-sd-j7q">
-                    <rect key="frame" x="70" y="437" width="175" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gof-GU-toa"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="FyH-3p-EdC">
-                    <rect key="frame" x="70" y="462" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="2CZ-EP-NrP"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldNoteToRecipientDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="Z9v-qs-dp4"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="trash" translatesAutoresizingMaskIntoConstraints="NO" id="hr8-Qe-xD0" userLabel="Image Delete Share Link">
-                    <rect key="frame" x="13" y="512" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="Ktg-2f-87b"/>
-                        <constraint firstAttribute="width" constant="25" id="ZJu-Y5-U67"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Delete share link" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ff4-JE-zGU">
-                    <rect key="frame" x="70" y="517" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gYi-S0-IOg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CLA-UL-mYb">
-                    <rect key="frame" x="13" y="512" width="217" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="fWP-XF-kQx"/>
-                    </constraints>
-                    <connections>
-                        <action selector="buttonDeleteShareLinkWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="ANe-oV-NCX"/>
-                    </connections>
-                </button>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add" translatesAutoresizingMaskIntoConstraints="NO" id="6SU-Ak-Q7m">
-                    <rect key="frame" x="13" y="557" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="25" id="NLr-qc-w3G"/>
-                        <constraint firstAttribute="height" constant="25" id="wkp-ks-jJM"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add another link" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cna-iK-PD7">
-                    <rect key="frame" x="70" y="562" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="p9o-oI-gWq"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0bK-Kl-hcs">
-                    <rect key="frame" x="13" y="557" width="217" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="wQO-6d-vWV"/>
-                    </constraints>
-                    <connections>
-                        <action selector="buttonAddAnotherLinkWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="1Ea-g9-pQ8"/>
-                    </connections>
-                </button>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="0ON-8M-J6K" userLabel="SwitchAllowEditing">
-                    <rect key="frame" x="10" y="113" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchAllowUploadAndEditingWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="HEh-km-e1I"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Allow upload and editing" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9rD-k5-hnW">
-                    <rect key="frame" x="70" y="121" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="zKi-d5-7DQ"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="jpY-MU-ecU" userLabel="SwitchAllowEditing">
-                    <rect key="frame" x="10" y="164" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchFileDropWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="32M-Ks-mr6"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="File drop (upload only)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QJc-Cx-Fa3">
-                    <rect key="frame" x="70" y="172" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="GRe-k0-V9C"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Placeholder" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="JOx-l5-TUp">
-                    <rect key="frame" x="10" y="12" width="230" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="eTg-X2-ih2"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fielLabelDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="s4f-hL-eZ2"/>
-                    </connections>
-                </textField>
-            </subviews>
-            <constraints>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="0WP-PE-HTp"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="2RV-rL-sYG"/>
-                <constraint firstItem="HaY-OM-mQh" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="4CZ-Mo-lOP"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="centerY" secondItem="F4T-wQ-tBU" secondAttribute="centerY" id="4KH-Py-OgY"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="centerY" secondItem="dB8-1M-WZr" secondAttribute="centerY" id="5QL-7q-jdE"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="top" secondItem="grT-sd-j7q" secondAttribute="bottom" constant="10" id="7al-MO-ezA"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="8lb-ki-xfh"/>
-                <constraint firstItem="0ON-8M-J6K" firstAttribute="top" secondItem="sjf-wF-y07" secondAttribute="bottom" constant="20" id="AGy-qr-ahT"/>
-                <constraint firstItem="0bK-Kl-hcs" firstAttribute="top" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="20" id="Bka-Hj-Arm"/>
-                <constraint firstAttribute="trailing" secondItem="ymk-0u-ddH" secondAttribute="trailing" constant="10" id="Chd-iQ-EdR"/>
-                <constraint firstItem="KXo-cP-gkc" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="CuB-lc-pHi"/>
-                <constraint firstItem="UIn-eq-hkP" firstAttribute="top" secondItem="jpY-MU-ecU" secondAttribute="bottom" constant="20" id="EO5-Qr-Xxq"/>
-                <constraint firstItem="UIn-eq-hkP" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="FwN-Rj-koX"/>
-                <constraint firstItem="HDO-WC-RvJ" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="GTl-Tq-cLY"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="centerY" secondItem="sjf-wF-y07" secondAttribute="centerY" id="HiA-pE-L6l"/>
-                <constraint firstItem="6SU-Ak-Q7m" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="Hqf-wy-u3S"/>
-                <constraint firstAttribute="trailing" secondItem="e1F-PV-32s" secondAttribute="trailing" constant="10" id="ImT-sr-UAr"/>
-                <constraint firstAttribute="trailing" secondItem="QJc-Cx-Fa3" secondAttribute="trailing" constant="10" id="JJ4-N8-Sbc"/>
-                <constraint firstItem="QJc-Cx-Fa3" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="Jnb-0A-4RI"/>
-                <constraint firstAttribute="trailing" secondItem="0bK-Kl-hcs" secondAttribute="trailing" constant="20" id="Jy3-Qb-ucs"/>
-                <constraint firstAttribute="trailing" secondItem="cna-iK-PD7" secondAttribute="trailing" constant="10" id="LEz-3F-g5Q"/>
-                <constraint firstAttribute="trailing" secondItem="grT-sd-j7q" secondAttribute="trailing" constant="5" id="Nyn-RD-jTz"/>
-                <constraint firstItem="6SU-Ak-Q7m" firstAttribute="top" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="20" id="OU0-vG-YTq"/>
-                <constraint firstAttribute="trailing" secondItem="FyH-3p-EdC" secondAttribute="trailing" constant="10" id="RhU-wl-afT"/>
-                <constraint firstItem="jpY-MU-ecU" firstAttribute="top" secondItem="0ON-8M-J6K" secondAttribute="bottom" constant="20" id="STB-7n-YyT"/>
-                <constraint firstItem="KXo-cP-gkc" firstAttribute="centerY" secondItem="UIn-eq-hkP" secondAttribute="centerY" id="Snt-zf-mcs"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="TFC-63-muN"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="top" secondItem="e1F-PV-32s" secondAttribute="bottom" constant="20" id="TIV-5L-Cza"/>
-                <constraint firstAttribute="trailing" secondItem="9rD-k5-hnW" secondAttribute="trailing" constant="10" id="TUb-mC-BhW"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="TXe-jF-DdS"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="top" secondItem="JOx-l5-TUp" secondAttribute="bottom" constant="20" id="UTk-iX-STG"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="Ua2-93-05m"/>
-                <constraint firstItem="HaY-OM-mQh" firstAttribute="centerY" secondItem="HDO-WC-RvJ" secondAttribute="centerY" id="UcN-gf-Prv"/>
-                <constraint firstItem="e1F-PV-32s" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="YCZ-Z6-1Ty"/>
-                <constraint firstItem="9rD-k5-hnW" firstAttribute="centerY" secondItem="0ON-8M-J6K" secondAttribute="centerY" id="ZHV-C3-5rz"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="Zoj-Ro-jFv"/>
-                <constraint firstAttribute="trailing" secondItem="IHP-P8-rm2" secondAttribute="trailing" constant="10" id="Zsj-Ja-2wq"/>
-                <constraint firstItem="cna-iK-PD7" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="aZc-3Q-liP"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="top" secondItem="ymk-0u-ddH" secondAttribute="bottom" constant="20" id="aj8-2w-ySe"/>
-                <constraint firstItem="0bK-Kl-hcs" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="bSd-GG-kS3"/>
-                <constraint firstItem="jpY-MU-ecU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="bkE-q5-Vpr"/>
-                <constraint firstItem="HDO-WC-RvJ" firstAttribute="top" secondItem="UIn-eq-hkP" secondAttribute="bottom" constant="20" id="dex-mb-oRg"/>
-                <constraint firstItem="9rD-k5-hnW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="eaN-ru-7yU"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="elF-be-kqS"/>
-                <constraint firstItem="cna-iK-PD7" firstAttribute="centerY" secondItem="0bK-Kl-hcs" secondAttribute="centerY" id="fDj-O7-Xdr"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="top" secondItem="FyH-3p-EdC" secondAttribute="bottom" constant="20" id="itX-To-Hbm"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="top" secondItem="qll-9F-4DA" secondAttribute="bottom" constant="10" id="k4G-Yb-xBy"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="lRX-gv-77N"/>
-                <constraint firstAttribute="trailing" secondItem="Ff4-JE-zGU" secondAttribute="trailing" constant="10" id="ljN-WF-OVS"/>
-                <constraint firstItem="e1F-PV-32s" firstAttribute="top" secondItem="HaY-OM-mQh" secondAttribute="bottom" constant="10" id="m5R-ms-HZh"/>
-                <constraint firstItem="0ON-8M-J6K" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="mQf-ph-p16"/>
-                <constraint firstAttribute="trailing" secondItem="JOx-l5-TUp" secondAttribute="trailing" constant="10" id="mq5-TO-THS"/>
-                <constraint firstItem="JOx-l5-TUp" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="n0G-KB-JE2"/>
-                <constraint firstAttribute="trailing" secondItem="CLA-UL-mYb" secondAttribute="trailing" constant="20" id="oEb-Su-Nu5"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qEq-8J-iTD"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qrv-wQ-p6E"/>
-                <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="0bK-Kl-hcs" secondAttribute="bottom" constant="10" id="rgb-gX-oJd"/>
-                <constraint firstAttribute="trailing" secondItem="KXo-cP-gkc" secondAttribute="trailing" constant="10" id="uDa-6r-K84"/>
-                <constraint firstAttribute="trailing" secondItem="qll-9F-4DA" secondAttribute="trailing" constant="10" id="vaT-9Q-m84"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="x4S-GE-lJ8"/>
-                <constraint firstAttribute="trailing" secondItem="HaY-OM-mQh" secondAttribute="trailing" constant="10" id="yvI-xV-T7d"/>
-                <constraint firstItem="QJc-Cx-Fa3" firstAttribute="centerY" secondItem="jpY-MU-ecU" secondAttribute="centerY" id="z3L-Nd-uWl"/>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="zc7-db-OeN"/>
-                <constraint firstItem="JOx-l5-TUp" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="zsp-AH-Dzr"/>
-            </constraints>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <connections>
-                <outlet property="buttonAddAnotherLink" destination="0bK-Kl-hcs" id="XMo-Cp-y6f"/>
-                <outlet property="buttonDeleteShareLink" destination="CLA-UL-mYb" id="LVP-Vh-RHb"/>
-                <outlet property="fieldLabel" destination="JOx-l5-TUp" id="RTd-kU-zGz"/>
-                <outlet property="fieldNoteToRecipient" destination="FyH-3p-EdC" id="EBz-iA-1tq"/>
-                <outlet property="fieldPasswordProtect" destination="e1F-PV-32s" id="c1Y-0f-UYD"/>
-                <outlet property="fieldSetExpirationDate" destination="ymk-0u-ddH" id="W6o-xf-Zj2"/>
-                <outlet property="imageAddAnotherLink" destination="6SU-Ak-Q7m" id="Is7-q2-ZJu"/>
-                <outlet property="imageDeleteShareLink" destination="hr8-Qe-xD0" id="hGE-fg-rnv"/>
-                <outlet property="imageNoteToRecipient" destination="F4T-wQ-tBU" id="IHc-Q2-VxM"/>
-                <outlet property="labelAddAnotherLink" destination="cna-iK-PD7" id="xax-ip-GpR"/>
-                <outlet property="labelAllowUploadAndEditing" destination="9rD-k5-hnW" id="rqA-Me-ERg"/>
-                <outlet property="labelDeleteShareLink" destination="Ff4-JE-zGU" id="7jH-iS-zf8"/>
-                <outlet property="labelFileDrop" destination="QJc-Cx-Fa3" id="mN5-D6-JIs"/>
-                <outlet property="labelHideDownload" destination="KXo-cP-gkc" id="vis-Zu-pga"/>
-                <outlet property="labelNoteToRecipient" destination="grT-sd-j7q" id="yOv-Ke-EnF"/>
-                <outlet property="labelPasswordProtect" destination="HaY-OM-mQh" id="nlG-u7-v1H"/>
-                <outlet property="labelReadOnly" destination="IHP-P8-rm2" id="Rgw-5M-bf6"/>
-                <outlet property="labelSetExpirationDate" destination="qll-9F-4DA" id="K8B-Ys-V8e"/>
-                <outlet property="switchAllowUploadAndEditing" destination="0ON-8M-J6K" id="cY7-1g-kDC"/>
-                <outlet property="switchFileDrop" destination="jpY-MU-ecU" id="gs6-3e-de6"/>
-                <outlet property="switchHideDownload" destination="UIn-eq-hkP" id="25D-zI-MEj"/>
-                <outlet property="switchPasswordProtect" destination="HDO-WC-RvJ" id="K7a-3i-8kx"/>
-                <outlet property="switchReadOnly" destination="sjf-wF-y07" id="QSL-7L-cdn"/>
-                <outlet property="switchSetExpirationDate" destination="dB8-1M-WZr" id="R5d-Hf-ga6"/>
-            </connections>
-            <point key="canvasLocation" x="-142.5" y="519.71830985915494"/>
-        </view>
-    </objects>
-    <resources>
-        <image name="add" width="25" height="25"/>
-        <image name="file_txt" width="300" height="300"/>
-        <image name="trash" width="512" height="512"/>
-    </resources>
-</document>

+ 0 - 484
iOSClient/Share/NCShareLinkMenuView.swift

@@ -1,484 +0,0 @@
-//
-//  NCShareLinkMenuView.swift
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 25/07/2019.
-//  Copyright © 2019 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-import UIKit
-import FSCalendar
-import NCCommunication
-
-class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, UITextFieldDelegate, NCShareNetworkingDelegate, FSCalendarDelegate, FSCalendarDelegateAppearance {
-
-    @IBOutlet weak var fieldLabel: UITextField!
-
-    @IBOutlet weak var switchAllowEditing: UISwitch!
-    @IBOutlet weak var labelAllowEditing: UILabel!
-
-    @IBOutlet weak var switchReadOnly: UISwitch!
-    @IBOutlet weak var labelReadOnly: UILabel!
-
-    @IBOutlet weak var switchAllowUploadAndEditing: UISwitch!
-    @IBOutlet weak var labelAllowUploadAndEditing: UILabel!
-
-    @IBOutlet weak var switchFileDrop: UISwitch!
-    @IBOutlet weak var labelFileDrop: UILabel!
-
-    @IBOutlet weak var switchHideDownload: UISwitch!
-    @IBOutlet weak var labelHideDownload: UILabel!
-
-    @IBOutlet weak var switchPasswordProtect: UISwitch!
-    @IBOutlet weak var labelPasswordProtect: UILabel!
-    @IBOutlet weak var fieldPasswordProtect: UITextField!
-
-    @IBOutlet weak var switchSetExpirationDate: UISwitch!
-    @IBOutlet weak var labelSetExpirationDate: UILabel!
-    @IBOutlet weak var fieldSetExpirationDate: UITextField!
-
-    @IBOutlet weak var imageNoteToRecipient: UIImageView!
-    @IBOutlet weak var labelNoteToRecipient: UILabel!
-    @IBOutlet weak var fieldNoteToRecipient: UITextField!
-
-    @IBOutlet weak var buttonDeleteShareLink: UIButton!
-    @IBOutlet weak var labelDeleteShareLink: UILabel!
-    @IBOutlet weak var imageDeleteShareLink: UIImageView!
-
-    @IBOutlet weak var buttonAddAnotherLink: UIButton!
-    @IBOutlet weak var labelAddAnotherLink: UILabel!
-    @IBOutlet weak var imageAddAnotherLink: UIImageView!
-
-    private let appDelegate = UIApplication.shared.delegate as! AppDelegate
-
-    var width: CGFloat = 0
-    var height: CGFloat = 0
-
-    private var tableShare: tableShare?
-    var metadata: tableMetadata?
-    var shareViewController: NCShare?
-    private var networking: NCShareNetworking?
-
-    var viewWindow: UIView?
-    var viewWindowCalendar: UIView?
-    private var calendar: FSCalendar?
-    private var activeTextfieldDiff: CGFloat = 0
-    private var activeTextField = UITextField()
-
-    override func awakeFromNib() {
-
-        layer.borderColor = UIColor.lightGray.cgColor
-        layer.borderWidth = 0.5
-        layer.cornerRadius = 5
-        layer.masksToBounds = false
-        layer.shadowOffset = CGSize(width: 2, height: 2)
-        layer.shadowOpacity = 0.2
-
-        fieldLabel?.placeholder = NSLocalizedString("_Link_name_", comment: "")
-
-        switchAllowEditing?.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchAllowEditing?.onTintColor = NCBrandColor.shared.brandElement
-        switchReadOnly?.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchReadOnly?.onTintColor = NCBrandColor.shared.brandElement
-        switchAllowUploadAndEditing?.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchAllowUploadAndEditing?.onTintColor = NCBrandColor.shared.brandElement
-        switchFileDrop?.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchFileDrop?.onTintColor = NCBrandColor.shared.brandElement
-        switchHideDownload.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchHideDownload.onTintColor = NCBrandColor.shared.brandElement
-        switchPasswordProtect.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchPasswordProtect.onTintColor = NCBrandColor.shared.brandElement
-        switchSetExpirationDate.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchSetExpirationDate.onTintColor = NCBrandColor.shared.brandElement
-
-        labelAllowEditing?.text = NSLocalizedString("_share_allow_editing_", comment: "")
-        labelAllowEditing?.textColor = NCBrandColor.shared.label
-        labelReadOnly?.text = NSLocalizedString("_share_read_only_", comment: "")
-        labelReadOnly?.textColor = NCBrandColor.shared.label
-        labelAllowUploadAndEditing?.text = NSLocalizedString("_share_allow_upload_", comment: "")
-        labelAllowUploadAndEditing?.textColor = NCBrandColor.shared.label
-        labelFileDrop?.text = NSLocalizedString("_share_file_drop_", comment: "")
-        labelFileDrop?.textColor = NCBrandColor.shared.label
-        labelHideDownload?.text = NSLocalizedString("_share_hide_download_", comment: "")
-        labelHideDownload?.textColor = NCBrandColor.shared.label
-        labelPasswordProtect?.text = NSLocalizedString("_share_password_protect_", comment: "")
-        labelPasswordProtect?.textColor = NCBrandColor.shared.label
-        labelSetExpirationDate?.text = NSLocalizedString("_share_expiration_date_", comment: "")
-        labelSetExpirationDate?.textColor = NCBrandColor.shared.label
-        labelNoteToRecipient?.text = NSLocalizedString("_share_note_recipient_", comment: "")
-        labelNoteToRecipient?.textColor = NCBrandColor.shared.label
-        labelDeleteShareLink?.text = NSLocalizedString("_share_delete_sharelink_", comment: "")
-        labelDeleteShareLink?.textColor = NCBrandColor.shared.label
-        labelAddAnotherLink?.text = NSLocalizedString("_share_add_sharelink_", comment: "")
-        labelAddAnotherLink?.textColor = NCBrandColor.shared.label
-
-        fieldSetExpirationDate.inputView = UIView()
-
-        fieldLabel.delegate = self
-        fieldPasswordProtect.delegate = self
-        fieldNoteToRecipient.delegate = self
-
-        imageNoteToRecipient.image = UIImage(named: "file_txt")!.image(color: NCBrandColor.shared.gray, size: 50)
-        imageDeleteShareLink.image = NCUtility.shared.loadImage(named: "trash", color: NCBrandColor.shared.gray, size: 50)
-        imageAddAnotherLink.image =  NCUtility.shared.loadImage(named: "plus", color: NCBrandColor.shared.gray, size: 50)
-
-        NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
-    }
-
-    override func willMove(toWindow newWindow: UIWindow?) {
-        super.willMove(toWindow: newWindow)
-
-        if newWindow == nil {
-            // UIView disappear
-            shareViewController?.reloadData()
-        } else {
-            // UIView appear
-            networking = NCShareNetworking(metadata: metadata!, urlBase: appDelegate.urlBase, view: self, delegate: self)
-        }
-    }
-
-    func unLoad() {
-        viewWindowCalendar?.removeFromSuperview()
-        viewWindow?.removeFromSuperview()
-
-        viewWindowCalendar = nil
-        viewWindow = nil
-    }
-
-    func reloadData(idShare: Int) {
-
-        guard let metadata = self.metadata else { return }
-        tableShare = NCManageDatabase.shared.getTableShare(account: metadata.account, idShare: idShare)
-        guard let tableShare = self.tableShare else { return }
-
-        // Label
-        fieldLabel.text = tableShare.label
-
-        if metadata.directory {
-            // File Drop
-            if tableShare.permissions == NCGlobal.shared.permissionCreateShare {
-                switchReadOnly.setOn(false, animated: false)
-                switchAllowUploadAndEditing.setOn(false, animated: false)
-                switchFileDrop.setOn(true, animated: false)
-            } else {
-                // Read Only
-                if CCUtility.isAnyPermission(toEdit: tableShare.permissions) {
-                    switchReadOnly.setOn(false, animated: false)
-                    switchAllowUploadAndEditing.setOn(true, animated: false)
-                } else {
-                    switchReadOnly.setOn(true, animated: false)
-                    switchAllowUploadAndEditing.setOn(false, animated: false)
-                }
-                switchFileDrop.setOn(false, animated: false)
-            }
-        } else {
-            // Allow editing
-            if CCUtility.isAnyPermission(toEdit: tableShare.permissions) {
-                switchAllowEditing.setOn(true, animated: false)
-            } else {
-                switchAllowEditing.setOn(false, animated: false)
-            }
-        }
-
-        // Hide download
-        if tableShare.hideDownload {
-            switchHideDownload.setOn(true, animated: false)
-        } else {
-            switchHideDownload.setOn(false, animated: false)
-        }
-
-        // Password protect
-        if tableShare.shareWith.count > 0 {
-            switchPasswordProtect.setOn(true, animated: false)
-            fieldPasswordProtect.isEnabled = true
-            fieldPasswordProtect.text = tableShare.shareWith
-        } else {
-            switchPasswordProtect.setOn(false, animated: false)
-            fieldPasswordProtect.isEnabled = false
-            fieldPasswordProtect.text = ""
-        }
-
-        // Set expiration date
-        if tableShare.expirationDate != nil {
-            switchSetExpirationDate.setOn(true, animated: false)
-            fieldSetExpirationDate.isEnabled = true
-
-            let dateFormatter = DateFormatter()
-            dateFormatter.formatterBehavior = .behavior10_4
-            dateFormatter.dateStyle = .medium
-            fieldSetExpirationDate.text = dateFormatter.string(from: tableShare.expirationDate! as Date)
-        } else {
-            switchSetExpirationDate.setOn(false, animated: false)
-            fieldSetExpirationDate.isEnabled = false
-            fieldSetExpirationDate.text = ""
-        }
-
-        // Note to recipient
-        fieldNoteToRecipient.text = tableShare.note
-    }
-
-    func textFieldDidBeginEditing(_ textField: UITextField) {
-
-        self.activeTextField = textField
-    }
-
-    // MARK: - Keyboard notification
-
-    @objc internal func keyboardWillShow(_ notification: Notification?) {
-
-        activeTextfieldDiff = 0
-
-        if let info = notification?.userInfo, let centerObject = self.activeTextField.superview?.convert(self.activeTextField.center, to: nil) {
-
-            let frameEndUserInfoKey = UIResponder.keyboardFrameEndUserInfoKey
-            if let keyboardFrame = info[frameEndUserInfoKey] as? CGRect {
-                let diff = keyboardFrame.origin.y - centerObject.y - self.activeTextField.frame.height
-                if diff < 0 {
-                    activeTextfieldDiff = diff
-                    self.frame.origin.y += diff
-                }
-            }
-        }
-    }
-
-    @objc func keyboardWillHide(_ notification: Notification) {
-        self.frame.origin.y -= activeTextfieldDiff
-    }
-
-    // MARK: - Tap viewWindowCalendar
-
-    @objc func tapViewWindowCalendar(gesture: UITapGestureRecognizer) {
-        calendar?.removeFromSuperview()
-        viewWindowCalendar?.removeFromSuperview()
-
-        calendar = nil
-        viewWindowCalendar = nil
-
-        reloadData(idShare: tableShare?.idShare ?? 0)
-    }
-
-    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
-        return gestureRecognizer.view == touch.view
-    }
-
-    // MARK: - IBAction
-
-    // Allow editing (file)
-    @IBAction func switchAllowEditingChanged(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        guard let metadata = self.metadata else { return }
-
-        var permissions: Int = 0
-
-        if sender.isOn {
-            permissions = CCUtility.getPermissionsValue(byCanEdit: true, andCanCreate: true, andCanChange: true, andCanDelete: true, andCanShare: false, andIsFolder: metadata.directory)
-        } else {
-            permissions = CCUtility.getPermissionsValue(byCanEdit: false, andCanCreate: false, andCanChange: false, andCanDelete: false, andCanShare: false, andIsFolder: metadata.directory)
-        }
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    // Read Only (directory)
-    @IBAction func switchReadOnly(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        guard let metadata = self.metadata else { return }
-        let permissions = CCUtility.getPermissionsValue(byCanEdit: false, andCanCreate: false, andCanChange: false, andCanDelete: false, andCanShare: false, andIsFolder: metadata.directory)
-
-        if sender.isOn && permissions != tableShare.permissions {
-            switchAllowUploadAndEditing.setOn(false, animated: false)
-            switchFileDrop.setOn(false, animated: false)
-            networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-        } else {
-            sender.setOn(true, animated: false)
-        }
-    }
-
-    // Allow Upload And Editing (directory)
-    @IBAction func switchAllowUploadAndEditing(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        guard let metadata = self.metadata else { return }
-        let permissions = CCUtility.getPermissionsValue(byCanEdit: true, andCanCreate: true, andCanChange: true, andCanDelete: true, andCanShare: false, andIsFolder: metadata.directory)
-
-        if sender.isOn && permissions != tableShare.permissions {
-            switchReadOnly.setOn(false, animated: false)
-            switchFileDrop.setOn(false, animated: false)
-            networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-        } else {
-            sender.setOn(true, animated: false)
-        }
-    }
-
-    // File Drop (directory)
-    @IBAction func switchFileDrop(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        let permissions = NCGlobal.shared.permissionCreateShare
-
-        if sender.isOn && permissions != tableShare.permissions {
-            switchReadOnly.setOn(false, animated: false)
-            switchAllowUploadAndEditing.setOn(false, animated: false)
-            networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-        } else {
-            sender.setOn(true, animated: false)
-        }
-    }
-
-    // Hide download
-    @IBAction func switchHideDownloadChanged(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: nil, label: nil, expirationDate: nil, hideDownload: sender.isOn)
-    }
-
-    // Password protect
-    @IBAction func switchPasswordProtectChanged(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-
-        if sender.isOn {
-            fieldPasswordProtect.isEnabled = true
-            fieldPasswordProtect.text = ""
-            fieldPasswordProtect.becomeFirstResponder()
-        } else {
-            networking?.updateShare(idShare: tableShare.idShare, password: "", permissions: tableShare.permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-        }
-    }
-
-    @IBAction func fieldPasswordProtectDidEndOnExit(textField: UITextField) {
-
-        guard let tableShare = self.tableShare else { return }
-
-        networking?.updateShare(idShare: tableShare.idShare, password: fieldPasswordProtect.text, permissions: tableShare.permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    // Set expiration date
-    @IBAction func switchSetExpirationDate(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-
-        if sender.isOn {
-            fieldSetExpirationDate.isEnabled = true
-            fieldSetExpirationDate(sender: fieldSetExpirationDate)
-        } else {
-            networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: nil, label: nil, expirationDate: "", hideDownload: tableShare.hideDownload)
-        }
-    }
-
-    @IBAction func fieldSetExpirationDate(sender: UITextField) {
-
-        let calendar = NCShareCommon.shared.openCalendar(view: self, width: width, height: height)
-        calendar.calendarView.delegate = self
-        self.calendar = calendar.calendarView
-        viewWindowCalendar = calendar.viewWindow
-
-        let tap = UITapGestureRecognizer(target: self, action: #selector(tapViewWindowCalendar))
-        tap.delegate = self
-        viewWindowCalendar?.addGestureRecognizer(tap)
-    }
-
-    // Note to recipient
-    @IBAction func fieldNoteToRecipientDidEndOnExit(textField: UITextField) {
-
-        guard let tableShare = self.tableShare else { return }
-        if fieldNoteToRecipient.text == nil { return }
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: fieldNoteToRecipient.text, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    // Label
-    @IBAction func fielLabelDidEndOnExit(textField: UITextField) {
-
-        guard let tableShare = self.tableShare else { return }
-        if fieldLabel.text == nil { return }
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: nil, label: fieldLabel.text, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    // Delete share link
-    @IBAction func buttonDeleteShareLink(sender: UIButton) {
-
-        guard let tableShare = self.tableShare else { return }
-
-        networking?.unShare(idShare: tableShare.idShare)
-    }
-
-    // Add another link
-    @IBAction func buttonAddAnotherLink(sender: UIButton) {
-
-        networking?.createShareLink(password: "")
-    }
-
-    // MARK: - Delegate networking
-
-    func readShareCompleted() {
-        reloadData(idShare: tableShare?.idShare ?? 0)
-    }
-
-    func shareCompleted() {
-        unLoad()
-        NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataNCShare)
-    }
-
-    func unShareCompleted() {
-        unLoad()
-        NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataNCShare)
-    }
-
-    func updateShareWithError(idShare: Int) {
-        reloadData(idShare: idShare)
-    }
-
-    func getSharees(sharees: [NCCommunicationSharee]?) { }
-
-    // MARK: - Delegate calendar
-
-    func calendar(_ calendar: FSCalendar, didSelect date: Date, at monthPosition: FSCalendarMonthPosition) {
-
-        if monthPosition == .previous || monthPosition == .next {
-            calendar.setCurrentPage(date, animated: true)
-        } else {
-            let dateFormatter = DateFormatter()
-            dateFormatter.formatterBehavior = .behavior10_4
-            dateFormatter.dateStyle = .medium
-            fieldSetExpirationDate.text = dateFormatter.string(from: date)
-            fieldSetExpirationDate.endEditing(true)
-
-            viewWindowCalendar?.removeFromSuperview()
-
-            guard let tableShare = self.tableShare else { return }
-
-            dateFormatter.dateFormat = "YYYY-MM-dd HH:mm:ss"
-            let expirationDate = dateFormatter.string(from: date)
-
-            networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: nil, label: nil, expirationDate: expirationDate, hideDownload: tableShare.hideDownload)
-        }
-    }
-
-    func calendar(_ calendar: FSCalendar, shouldSelect date: Date, at monthPosition: FSCalendarMonthPosition) -> Bool {
-        return date > Date()
-    }
-
-    func calendar(_ calendar: FSCalendar, appearance: FSCalendarAppearance, titleDefaultColorFor date: Date) -> UIColor? {
-        return date > Date() ? NCBrandColor.shared.label : NCBrandColor.shared.systemGray3
-    }
-}

+ 0 - 274
iOSClient/Share/NCShareLinkMenuView.xib

@@ -1,274 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
-    <device id="retina3_5" orientation="portrait" appearance="light"/>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view opaque="NO" contentMode="scaleToFill" id="iN0-l3-epB" customClass="NCShareLinkMenuView" customModule="Nextcloud" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="250" height="500"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Placeholder" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="AjK-Ty-MRn">
-                    <rect key="frame" x="10" y="10" width="230" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="sVl-pt-Qe5"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fielLabelDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="WwX-ie-SRK"/>
-                    </connections>
-                </textField>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="sjf-wF-y07" userLabel="SwitchAllowEditing">
-                    <rect key="frame" x="10" y="60" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchAllowEditingChangedWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="22f-fh-Qc1"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Allow editing" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IHP-P8-rm2">
-                    <rect key="frame" x="70" y="68" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="lcS-7f-bEg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="UIn-eq-hkP">
-                    <rect key="frame" x="10" y="111" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchHideDownloadChangedWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="ZUj-2h-gQC"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hide download" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KXo-cP-gkc">
-                    <rect key="frame" x="70" y="119" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="IEP-cO-Um6"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="HDO-WC-RvJ">
-                    <rect key="frame" x="10" y="162" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchPasswordProtectChangedWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="wGL-du-81Q"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Password protect" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HaY-OM-mQh">
-                    <rect key="frame" x="70" y="170" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="MeH-bs-tZK"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="e1F-PV-32s">
-                    <rect key="frame" x="70" y="195" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="tTv-8w-kxm"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits" secureTextEntry="YES" textContentType="password"/>
-                    <connections>
-                        <action selector="fieldPasswordProtectDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="2PO-wf-bHs"/>
-                    </connections>
-                </textField>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="dB8-1M-WZr">
-                    <rect key="frame" x="10" y="245" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="26x-ld-Jsj"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Set expiration date" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qll-9F-4DA">
-                    <rect key="frame" x="70" y="253" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="KyU-PL-PRI"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ymk-0u-ddH">
-                    <rect key="frame" x="70" y="278" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="G4f-LN-v7k"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="editingDidBegin" id="5Ou-k5-UM5"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="file_txt" translatesAutoresizingMaskIntoConstraints="NO" id="F4T-wQ-tBU">
-                    <rect key="frame" x="13" y="328" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="7uC-w2-XPl"/>
-                        <constraint firstAttribute="width" constant="25" id="YkI-0i-Hbj"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Note to recipient" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="grT-sd-j7q">
-                    <rect key="frame" x="70" y="333" width="175" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gof-GU-toa"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="FyH-3p-EdC">
-                    <rect key="frame" x="70" y="358" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="hye-cf-nPD"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldNoteToRecipientDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="Z9v-qs-dp4"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="trash" translatesAutoresizingMaskIntoConstraints="NO" id="hr8-Qe-xD0" userLabel="Image Delete Share Link">
-                    <rect key="frame" x="13" y="408" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="Ktg-2f-87b"/>
-                        <constraint firstAttribute="width" constant="25" id="ZJu-Y5-U67"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Delete share link" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ff4-JE-zGU">
-                    <rect key="frame" x="70" y="413" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gYi-S0-IOg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CLA-UL-mYb">
-                    <rect key="frame" x="13" y="408" width="217" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="fWP-XF-kQx"/>
-                    </constraints>
-                    <connections>
-                        <action selector="buttonDeleteShareLinkWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="ANe-oV-NCX"/>
-                    </connections>
-                </button>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add" translatesAutoresizingMaskIntoConstraints="NO" id="6SU-Ak-Q7m">
-                    <rect key="frame" x="13" y="453" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="25" id="NLr-qc-w3G"/>
-                        <constraint firstAttribute="height" constant="25" id="wkp-ks-jJM"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add another link" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cna-iK-PD7">
-                    <rect key="frame" x="70" y="458" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="p9o-oI-gWq"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0bK-Kl-hcs">
-                    <rect key="frame" x="13" y="453" width="217" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="wQO-6d-vWV"/>
-                    </constraints>
-                    <connections>
-                        <action selector="buttonAddAnotherLinkWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="1Ea-g9-pQ8"/>
-                    </connections>
-                </button>
-            </subviews>
-            <constraints>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="0WP-PE-HTp"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="2RV-rL-sYG"/>
-                <constraint firstItem="HaY-OM-mQh" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="4CZ-Mo-lOP"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="centerY" secondItem="F4T-wQ-tBU" secondAttribute="centerY" id="4KH-Py-OgY"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="centerY" secondItem="dB8-1M-WZr" secondAttribute="centerY" id="5QL-7q-jdE"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="top" secondItem="grT-sd-j7q" secondAttribute="bottom" constant="10" id="7al-MO-ezA"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="8lb-ki-xfh"/>
-                <constraint firstItem="0bK-Kl-hcs" firstAttribute="top" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="20" id="Bka-Hj-Arm"/>
-                <constraint firstAttribute="trailing" secondItem="ymk-0u-ddH" secondAttribute="trailing" constant="10" id="Chd-iQ-EdR"/>
-                <constraint firstAttribute="trailing" secondItem="AjK-Ty-MRn" secondAttribute="trailing" constant="10" id="Cjo-Gm-Fqi"/>
-                <constraint firstItem="KXo-cP-gkc" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="CuB-lc-pHi"/>
-                <constraint firstItem="UIn-eq-hkP" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="FwN-Rj-koX"/>
-                <constraint firstItem="HDO-WC-RvJ" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="GTl-Tq-cLY"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="centerY" secondItem="sjf-wF-y07" secondAttribute="centerY" id="HiA-pE-L6l"/>
-                <constraint firstItem="6SU-Ak-Q7m" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="Hqf-wy-u3S"/>
-                <constraint firstAttribute="trailing" secondItem="e1F-PV-32s" secondAttribute="trailing" constant="10" id="ImT-sr-UAr"/>
-                <constraint firstAttribute="trailing" secondItem="0bK-Kl-hcs" secondAttribute="trailing" constant="20" id="Jy3-Qb-ucs"/>
-                <constraint firstAttribute="trailing" secondItem="cna-iK-PD7" secondAttribute="trailing" constant="10" id="LEz-3F-g5Q"/>
-                <constraint firstAttribute="trailing" secondItem="grT-sd-j7q" secondAttribute="trailing" constant="5" id="Nyn-RD-jTz"/>
-                <constraint firstItem="6SU-Ak-Q7m" firstAttribute="top" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="20" id="OU0-vG-YTq"/>
-                <constraint firstAttribute="trailing" secondItem="FyH-3p-EdC" secondAttribute="trailing" constant="10" id="RhU-wl-afT"/>
-                <constraint firstItem="KXo-cP-gkc" firstAttribute="centerY" secondItem="UIn-eq-hkP" secondAttribute="centerY" id="Snt-zf-mcs"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="TFC-63-muN"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="top" secondItem="e1F-PV-32s" secondAttribute="bottom" constant="20" id="TIV-5L-Cza"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="TXe-jF-DdS"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="Ua2-93-05m"/>
-                <constraint firstItem="HaY-OM-mQh" firstAttribute="centerY" secondItem="HDO-WC-RvJ" secondAttribute="centerY" id="UcN-gf-Prv"/>
-                <constraint firstItem="e1F-PV-32s" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="YCZ-Z6-1Ty"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="Zoj-Ro-jFv"/>
-                <constraint firstAttribute="trailing" secondItem="IHP-P8-rm2" secondAttribute="trailing" constant="10" id="Zsj-Ja-2wq"/>
-                <constraint firstItem="cna-iK-PD7" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="aZc-3Q-liP"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="top" secondItem="ymk-0u-ddH" secondAttribute="bottom" constant="20" id="aj8-2w-ySe"/>
-                <constraint firstItem="0bK-Kl-hcs" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="bSd-GG-kS3"/>
-                <constraint firstItem="HDO-WC-RvJ" firstAttribute="top" secondItem="UIn-eq-hkP" secondAttribute="bottom" constant="20" id="dex-mb-oRg"/>
-                <constraint firstItem="AjK-Ty-MRn" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="eT2-WG-2Db"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="elF-be-kqS"/>
-                <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="0bK-Kl-hcs" secondAttribute="bottom" constant="10" id="eyC-io-Nk6"/>
-                <constraint firstItem="cna-iK-PD7" firstAttribute="centerY" secondItem="0bK-Kl-hcs" secondAttribute="centerY" id="fDj-O7-Xdr"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="top" secondItem="FyH-3p-EdC" secondAttribute="bottom" constant="20" id="itX-To-Hbm"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="top" secondItem="qll-9F-4DA" secondAttribute="bottom" constant="10" id="k4G-Yb-xBy"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="lRX-gv-77N"/>
-                <constraint firstAttribute="trailing" secondItem="Ff4-JE-zGU" secondAttribute="trailing" constant="10" id="ljN-WF-OVS"/>
-                <constraint firstItem="e1F-PV-32s" firstAttribute="top" secondItem="HaY-OM-mQh" secondAttribute="bottom" constant="10" id="m5R-ms-HZh"/>
-                <constraint firstAttribute="trailing" secondItem="CLA-UL-mYb" secondAttribute="trailing" constant="20" id="oEb-Su-Nu5"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qEq-8J-iTD"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qrv-wQ-p6E"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="top" secondItem="AjK-Ty-MRn" secondAttribute="bottom" constant="20" id="suK-qu-fvy"/>
-                <constraint firstAttribute="trailing" secondItem="KXo-cP-gkc" secondAttribute="trailing" constant="10" id="uDa-6r-K84"/>
-                <constraint firstItem="AjK-Ty-MRn" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="vWx-aM-wFJ"/>
-                <constraint firstAttribute="trailing" secondItem="qll-9F-4DA" secondAttribute="trailing" constant="10" id="vaT-9Q-m84"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="x4S-GE-lJ8"/>
-                <constraint firstAttribute="trailing" secondItem="HaY-OM-mQh" secondAttribute="trailing" constant="10" id="yvI-xV-T7d"/>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="zc7-db-OeN"/>
-                <constraint firstItem="UIn-eq-hkP" firstAttribute="top" secondItem="sjf-wF-y07" secondAttribute="bottom" constant="20" id="zex-fG-9ns"/>
-            </constraints>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <connections>
-                <outlet property="buttonAddAnotherLink" destination="0bK-Kl-hcs" id="XMo-Cp-y6f"/>
-                <outlet property="buttonDeleteShareLink" destination="CLA-UL-mYb" id="LVP-Vh-RHb"/>
-                <outlet property="fieldLabel" destination="AjK-Ty-MRn" id="qar-eZ-ctz"/>
-                <outlet property="fieldNoteToRecipient" destination="FyH-3p-EdC" id="EBz-iA-1tq"/>
-                <outlet property="fieldPasswordProtect" destination="e1F-PV-32s" id="c1Y-0f-UYD"/>
-                <outlet property="fieldSetExpirationDate" destination="ymk-0u-ddH" id="W6o-xf-Zj2"/>
-                <outlet property="imageAddAnotherLink" destination="6SU-Ak-Q7m" id="Is7-q2-ZJu"/>
-                <outlet property="imageDeleteShareLink" destination="hr8-Qe-xD0" id="hGE-fg-rnv"/>
-                <outlet property="imageNoteToRecipient" destination="F4T-wQ-tBU" id="IHc-Q2-VxM"/>
-                <outlet property="labelAddAnotherLink" destination="cna-iK-PD7" id="xax-ip-GpR"/>
-                <outlet property="labelAllowEditing" destination="IHP-P8-rm2" id="bfP-WI-ryB"/>
-                <outlet property="labelDeleteShareLink" destination="Ff4-JE-zGU" id="7jH-iS-zf8"/>
-                <outlet property="labelHideDownload" destination="KXo-cP-gkc" id="vis-Zu-pga"/>
-                <outlet property="labelNoteToRecipient" destination="grT-sd-j7q" id="yOv-Ke-EnF"/>
-                <outlet property="labelPasswordProtect" destination="HaY-OM-mQh" id="nlG-u7-v1H"/>
-                <outlet property="labelSetExpirationDate" destination="qll-9F-4DA" id="K8B-Ys-V8e"/>
-                <outlet property="switchAllowEditing" destination="sjf-wF-y07" id="8J2-kj-Ugp"/>
-                <outlet property="switchHideDownload" destination="UIn-eq-hkP" id="25D-zI-MEj"/>
-                <outlet property="switchPasswordProtect" destination="HDO-WC-RvJ" id="K7a-3i-8kx"/>
-                <outlet property="switchSetExpirationDate" destination="dB8-1M-WZr" id="R5d-Hf-ga6"/>
-            </connections>
-            <point key="canvasLocation" x="-60" y="350.625"/>
-        </view>
-    </objects>
-    <resources>
-        <image name="add" width="25" height="25"/>
-        <image name="file_txt" width="300" height="300"/>
-        <image name="trash" width="512" height="512"/>
-    </resources>
-</document>

+ 0 - 226
iOSClient/Share/NCShareUserFolderMenuView.xib

@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
-    <device id="retina3_5" orientation="portrait" appearance="light"/>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view opaque="NO" contentMode="scaleToFill" id="iN0-l3-epB" customClass="NCShareUserMenuView" customModule="Nextcloud" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="250" height="420"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="sjf-wF-y07">
-                    <rect key="frame" x="10" y="10" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchCanReshareChangedWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="Ezn-AP-uEh"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Can reshare" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IHP-P8-rm2">
-                    <rect key="frame" x="70" y="18" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="lcS-7f-bEg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="dB8-1M-WZr">
-                    <rect key="frame" x="10" y="214" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="A9c-YF-bXd"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Set expiration date" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qll-9F-4DA">
-                    <rect key="frame" x="70" y="222" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="KyU-PL-PRI"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ymk-0u-ddH">
-                    <rect key="frame" x="70" y="247" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="G4f-LN-v7k"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="WdF-Ie-Di0"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="file_txt" translatesAutoresizingMaskIntoConstraints="NO" id="F4T-wQ-tBU">
-                    <rect key="frame" x="13" y="297" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="7uC-w2-XPl"/>
-                        <constraint firstAttribute="width" constant="25" id="YkI-0i-Hbj"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Note to recipient" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="grT-sd-j7q">
-                    <rect key="frame" x="70" y="302" width="175" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gof-GU-toa"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="FyH-3p-EdC">
-                    <rect key="frame" x="70" y="327" width="170" height="34"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldNoteToRecipientDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="q1P-u7-EBw"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="trash" translatesAutoresizingMaskIntoConstraints="NO" id="hr8-Qe-xD0" userLabel="Image Delete Share Link">
-                    <rect key="frame" x="13" y="381" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="Ktg-2f-87b"/>
-                        <constraint firstAttribute="width" constant="25" id="ZJu-Y5-U67"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unshare" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ff4-JE-zGU">
-                    <rect key="frame" x="70" y="386" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gYi-S0-IOg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CLA-UL-mYb">
-                    <rect key="frame" x="13" y="381" width="217" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="fWP-XF-kQx"/>
-                    </constraints>
-                    <connections>
-                        <action selector="buttonUnshareWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="Nky-nT-rCz"/>
-                    </connections>
-                </button>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="1br-PL-gFf">
-                    <rect key="frame" x="10" y="61" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchCanCreateWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="M2Z-bc-ZKU"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Can create" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="G13-DS-7uC">
-                    <rect key="frame" x="70" y="69" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="nK7-xW-fbq"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="0yc-df-C1f">
-                    <rect key="frame" x="10" y="112" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchCanChangeWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="XIQ-GD-IU7"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Can change" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YWL-Ks-51c">
-                    <rect key="frame" x="70" y="120" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="NYy-3u-P1R"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="vja-ge-I6S">
-                    <rect key="frame" x="10" y="163" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchCanDeleteWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="BRV-e3-C17"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Can delete" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dZP-fH-9sg">
-                    <rect key="frame" x="70" y="171" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="p6u-3B-cFa"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-            </subviews>
-            <constraints>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="0WP-PE-HTp"/>
-                <constraint firstItem="YWL-Ks-51c" firstAttribute="leading" secondItem="0yc-df-C1f" secondAttribute="trailing" constant="11" id="18d-Lv-xE7"/>
-                <constraint firstItem="dZP-fH-9sg" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="2N4-ol-qeH"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="2RV-rL-sYG"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="centerY" secondItem="F4T-wQ-tBU" secondAttribute="centerY" id="4KH-Py-OgY"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="centerY" secondItem="dB8-1M-WZr" secondAttribute="centerY" id="5QL-7q-jdE"/>
-                <constraint firstItem="vja-ge-I6S" firstAttribute="top" secondItem="0yc-df-C1f" secondAttribute="bottom" constant="20" id="6jy-3A-HWD"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="top" secondItem="grT-sd-j7q" secondAttribute="bottom" constant="10" id="7al-MO-ezA"/>
-                <constraint firstItem="dZP-fH-9sg" firstAttribute="centerY" secondItem="vja-ge-I6S" secondAttribute="centerY" id="7ne-dy-Lt1"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="8lb-ki-xfh"/>
-                <constraint firstAttribute="trailing" secondItem="ymk-0u-ddH" secondAttribute="trailing" constant="10" id="Chd-iQ-EdR"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="EW6-D3-tml"/>
-                <constraint firstItem="0yc-df-C1f" firstAttribute="top" secondItem="1br-PL-gFf" secondAttribute="bottom" constant="20" id="FGV-mm-Ko5"/>
-                <constraint firstItem="G13-DS-7uC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="GqL-Dy-FyM"/>
-                <constraint firstItem="1br-PL-gFf" firstAttribute="top" secondItem="sjf-wF-y07" secondAttribute="bottom" constant="20" id="HCV-Fc-QqK"/>
-                <constraint firstAttribute="trailing" secondItem="YWL-Ks-51c" secondAttribute="trailing" constant="10" id="HHo-s3-88y"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="centerY" secondItem="sjf-wF-y07" secondAttribute="centerY" id="HiA-pE-L6l"/>
-                <constraint firstItem="1br-PL-gFf" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="JKb-Jd-pOz"/>
-                <constraint firstItem="0yc-df-C1f" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="JYX-ih-uiD"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="top" secondItem="vja-ge-I6S" secondAttribute="bottom" constant="20" id="NSb-s1-gmD"/>
-                <constraint firstAttribute="trailing" secondItem="grT-sd-j7q" secondAttribute="trailing" constant="5" id="Nyn-RD-jTz"/>
-                <constraint firstAttribute="trailing" secondItem="FyH-3p-EdC" secondAttribute="trailing" constant="10" id="RhU-wl-afT"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="TFC-63-muN"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="TXe-jF-DdS"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="Ua2-93-05m"/>
-                <constraint firstAttribute="trailing" secondItem="dZP-fH-9sg" secondAttribute="trailing" constant="10" id="Y3X-Bg-zXC"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="Zoj-Ro-jFv"/>
-                <constraint firstAttribute="trailing" secondItem="IHP-P8-rm2" secondAttribute="trailing" constant="10" id="Zsj-Ja-2wq"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="top" secondItem="ymk-0u-ddH" secondAttribute="bottom" constant="20" id="aj8-2w-ySe"/>
-                <constraint firstItem="G13-DS-7uC" firstAttribute="centerY" secondItem="1br-PL-gFf" secondAttribute="centerY" id="cbx-hu-mhg"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="elF-be-kqS"/>
-                <constraint firstAttribute="trailing" secondItem="G13-DS-7uC" secondAttribute="trailing" constant="10" id="gKS-GP-xkX"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="top" secondItem="FyH-3p-EdC" secondAttribute="bottom" constant="20" id="itX-To-Hbm"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="top" secondItem="qll-9F-4DA" secondAttribute="bottom" constant="10" id="k4G-Yb-xBy"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="lRX-gv-77N"/>
-                <constraint firstAttribute="trailing" secondItem="Ff4-JE-zGU" secondAttribute="trailing" constant="10" id="ljN-WF-OVS"/>
-                <constraint firstAttribute="trailing" secondItem="CLA-UL-mYb" secondAttribute="trailing" constant="20" id="oEb-Su-Nu5"/>
-                <constraint firstItem="YWL-Ks-51c" firstAttribute="centerY" secondItem="0yc-df-C1f" secondAttribute="centerY" id="p2G-NK-Qcr"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qEq-8J-iTD"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qrv-wQ-p6E"/>
-                <constraint firstItem="vja-ge-I6S" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="ukl-JN-XFD"/>
-                <constraint firstAttribute="trailing" secondItem="qll-9F-4DA" secondAttribute="trailing" constant="10" id="vaT-9Q-m84"/>
-                <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="10" id="w6T-Q9-OKA"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="x4S-GE-lJ8"/>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="zc7-db-OeN"/>
-            </constraints>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <connections>
-                <outlet property="buttonUnshare" destination="CLA-UL-mYb" id="fwq-pr-JO0"/>
-                <outlet property="fieldNoteToRecipient" destination="FyH-3p-EdC" id="389-TM-dhC"/>
-                <outlet property="fieldSetExpirationDate" destination="ymk-0u-ddH" id="erm-BP-BWD"/>
-                <outlet property="imageNoteToRecipient" destination="F4T-wQ-tBU" id="hv7-Ln-aYs"/>
-                <outlet property="imageUnshare" destination="hr8-Qe-xD0" id="kfC-D4-Ak0"/>
-                <outlet property="labelCanChange" destination="YWL-Ks-51c" id="3lh-TV-rKt"/>
-                <outlet property="labelCanCreate" destination="G13-DS-7uC" id="BOR-I2-EVX"/>
-                <outlet property="labelCanDelete" destination="dZP-fH-9sg" id="iCn-VY-P3p"/>
-                <outlet property="labelCanReshare" destination="IHP-P8-rm2" id="dkZ-O3-1cB"/>
-                <outlet property="labelNoteToRecipient" destination="grT-sd-j7q" id="0Rj-H1-Bqv"/>
-                <outlet property="labelSetExpirationDate" destination="qll-9F-4DA" id="SsD-jd-FX1"/>
-                <outlet property="labelUnshare" destination="Ff4-JE-zGU" id="Ubq-EL-yOd"/>
-                <outlet property="switchCanChange" destination="0yc-df-C1f" id="JcH-18-ZRX"/>
-                <outlet property="switchCanCreate" destination="1br-PL-gFf" id="3En-bH-Wzm"/>
-                <outlet property="switchCanDelete" destination="vja-ge-I6S" id="NN7-2l-NSz"/>
-                <outlet property="switchCanReshare" destination="sjf-wF-y07" id="3jS-Gr-YMT"/>
-                <outlet property="switchSetExpirationDate" destination="dB8-1M-WZr" id="0Ki-ah-3FE"/>
-            </connections>
-            <point key="canvasLocation" x="1.875" y="195"/>
-        </view>
-    </objects>
-    <resources>
-        <image name="file_txt" width="300" height="300"/>
-        <image name="trash" width="512" height="512"/>
-    </resources>
-</document>

+ 0 - 398
iOSClient/Share/NCShareUserMenuView.swift

@@ -1,398 +0,0 @@
-//
-//  NCShareUserMenuView.swift
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 25/07/2019.
-//  Copyright © 2019 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-import UIKit
-import FSCalendar
-import NCCommunication
-
-class NCShareUserMenuView: UIView, UIGestureRecognizerDelegate, UITextFieldDelegate, NCShareNetworkingDelegate, FSCalendarDelegate, FSCalendarDelegateAppearance {
-
-    @IBOutlet weak var switchCanReshare: UISwitch!
-    @IBOutlet weak var labelCanReshare: UILabel!
-
-    @IBOutlet weak var switchCanCreate: UISwitch!
-    @IBOutlet weak var labelCanCreate: UILabel!
-
-    @IBOutlet weak var switchCanChange: UISwitch!
-    @IBOutlet weak var labelCanChange: UILabel!
-
-    @IBOutlet weak var switchCanDelete: UISwitch!
-    @IBOutlet weak var labelCanDelete: UILabel!
-
-    @IBOutlet weak var switchSetExpirationDate: UISwitch!
-    @IBOutlet weak var labelSetExpirationDate: UILabel!
-    @IBOutlet weak var fieldSetExpirationDate: UITextField!
-
-    @IBOutlet weak var imageNoteToRecipient: UIImageView!
-    @IBOutlet weak var labelNoteToRecipient: UILabel!
-    @IBOutlet weak var fieldNoteToRecipient: UITextField!
-
-    @IBOutlet weak var buttonUnshare: UIButton!
-    @IBOutlet weak var labelUnshare: UILabel!
-    @IBOutlet weak var imageUnshare: UIImageView!
-
-    private let appDelegate = UIApplication.shared.delegate as! AppDelegate
-
-    var width: CGFloat = 0
-    var height: CGFloat = 0
-
-    private var tableShare: tableShare?
-    var metadata: tableMetadata?
-    var shareViewController: NCShare?
-    private var networking: NCShareNetworking?
-
-    var viewWindow: UIView?
-    var viewWindowCalendar: UIView?
-    private var calendar: FSCalendar?
-    private var activeTextfieldDiff: CGFloat = 0
-    private var activeTextField = UITextField()
-
-    override func awakeFromNib() {
-
-        layer.borderColor = UIColor.lightGray.cgColor
-        layer.borderWidth = 0.5
-        layer.cornerRadius = 5
-        layer.masksToBounds = false
-        layer.shadowOffset = CGSize(width: 2, height: 2)
-        layer.shadowOpacity = 0.2
-
-        switchCanReshare.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchCanReshare.onTintColor = NCBrandColor.shared.brandElement
-        switchCanCreate?.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchCanCreate?.onTintColor = NCBrandColor.shared.brandElement
-        switchCanChange?.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchCanChange?.onTintColor = NCBrandColor.shared.brandElement
-        switchCanDelete?.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchCanDelete?.onTintColor = NCBrandColor.shared.brandElement
-        switchSetExpirationDate.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
-        switchSetExpirationDate.onTintColor = NCBrandColor.shared.brandElement
-
-        labelCanReshare?.text = NSLocalizedString("_share_can_reshare_", comment: "")
-        labelCanReshare?.textColor = NCBrandColor.shared.label
-        labelCanCreate?.text = NSLocalizedString("_share_can_create_", comment: "")
-        labelCanCreate?.textColor = NCBrandColor.shared.label
-        labelCanChange?.text = NSLocalizedString("_share_can_change_", comment: "")
-        labelCanChange?.textColor = NCBrandColor.shared.label
-        labelCanDelete?.text = NSLocalizedString("_share_can_delete_", comment: "")
-        labelCanDelete?.textColor = NCBrandColor.shared.label
-        labelSetExpirationDate?.text = NSLocalizedString("_share_expiration_date_", comment: "")
-        labelSetExpirationDate?.textColor = NCBrandColor.shared.label
-        labelNoteToRecipient?.text = NSLocalizedString("_share_note_recipient_", comment: "")
-        labelNoteToRecipient?.textColor = NCBrandColor.shared.label
-        labelUnshare?.text = NSLocalizedString("_share_unshare_", comment: "")
-        labelUnshare?.textColor = NCBrandColor.shared.label
-
-        fieldSetExpirationDate.inputView = UIView()
-
-        fieldNoteToRecipient.delegate = self
-
-        imageNoteToRecipient.image = UIImage(named: "file_txt")!.image(color: NCBrandColor.shared.gray, size: 50)
-        imageUnshare.image = NCUtility.shared.loadImage(named: "trash", color: NCBrandColor.shared.gray, size: 50)
-
-        NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
-    }
-
-    override func willMove(toWindow newWindow: UIWindow?) {
-        super.willMove(toWindow: newWindow)
-
-        if newWindow == nil {
-            // UIView disappear
-            shareViewController?.reloadData()
-        } else {
-            // UIView appear
-            networking = NCShareNetworking(metadata: metadata!, urlBase: appDelegate.urlBase, view: self, delegate: self)
-        }
-    }
-
-    func unLoad() {
-        viewWindowCalendar?.removeFromSuperview()
-        viewWindow?.removeFromSuperview()
-
-        viewWindowCalendar = nil
-        viewWindow = nil
-    }
-
-    func reloadData(idShare: Int) {
-
-        guard let metadata = self.metadata else { return }
-        tableShare = NCManageDatabase.shared.getTableShare(account: metadata.account, idShare: idShare)
-        guard let tableShare = self.tableShare else { return }
-
-        // Can reshare (file)
-        let canReshare = CCUtility.isPermission(toCanShare: tableShare.permissions)
-        switchCanReshare.setOn(canReshare, animated: false)
-
-        if metadata.directory {
-            // Can create (folder)
-            let canCreate = CCUtility.isPermission(toCanCreate: tableShare.permissions)
-            switchCanCreate.setOn(canCreate, animated: false)
-
-            // Can change (folder)
-            let canChange = CCUtility.isPermission(toCanChange: tableShare.permissions)
-            switchCanChange.setOn(canChange, animated: false)
-
-            // Can delete (folder)
-            let canDelete = CCUtility.isPermission(toCanDelete: tableShare.permissions)
-            switchCanDelete.setOn(canDelete, animated: false)
-        }
-
-        // Set expiration date
-        if tableShare.expirationDate != nil {
-            switchSetExpirationDate.setOn(true, animated: false)
-            fieldSetExpirationDate.isEnabled = true
-
-            let dateFormatter = DateFormatter()
-            dateFormatter.formatterBehavior = .behavior10_4
-            dateFormatter.dateStyle = .medium
-            fieldSetExpirationDate.text = dateFormatter.string(from: tableShare.expirationDate! as Date)
-        } else {
-            switchSetExpirationDate.setOn(false, animated: false)
-            fieldSetExpirationDate.isEnabled = false
-            fieldSetExpirationDate.text = ""
-        }
-
-        // Note to recipient
-        fieldNoteToRecipient.text = tableShare.note
-    }
-
-    func textFieldDidBeginEditing(_ textField: UITextField) {
-
-        self.activeTextField = textField
-    }
-
-    // MARK: - Keyboard notification
-
-    @objc internal func keyboardWillShow(_ notification: Notification?) {
-
-        activeTextfieldDiff = 0
-
-        if let info = notification?.userInfo, let centerObject = self.activeTextField.superview?.convert(self.activeTextField.center, to: nil) {
-
-            let frameEndUserInfoKey = UIResponder.keyboardFrameEndUserInfoKey
-            if let keyboardFrame = info[frameEndUserInfoKey] as? CGRect {
-                let diff = keyboardFrame.origin.y - centerObject.y - self.activeTextField.frame.height
-                if diff < 0 {
-                    activeTextfieldDiff = diff
-                    self.frame.origin.y += diff
-                }
-            }
-        }
-    }
-
-    @objc func keyboardWillHide(_ notification: Notification) {
-        self.frame.origin.y -= activeTextfieldDiff
-    }
-
-    // MARK: - Tap viewWindowCalendar
-
-    @objc func tapViewWindowCalendar(gesture: UITapGestureRecognizer) {
-        calendar?.removeFromSuperview()
-        viewWindowCalendar?.removeFromSuperview()
-
-        calendar = nil
-        viewWindowCalendar = nil
-
-        reloadData(idShare: tableShare?.idShare ?? 0)
-    }
-
-    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
-        return gestureRecognizer.view == touch.view
-    }
-
-    // MARK: - IBAction
-
-    // Can reshare
-    @IBAction func switchCanReshareChanged(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        guard let metadata = self.metadata else { return }
-
-        let canEdit = CCUtility.isAnyPermission(toEdit: tableShare.permissions)
-        let canCreate = CCUtility.isPermission(toCanCreate: tableShare.permissions)
-        let canChange = CCUtility.isPermission(toCanChange: tableShare.permissions)
-        let canDelete = CCUtility.isPermission(toCanDelete: tableShare.permissions)
-
-        var permissions: Int = 0
-
-        if metadata.directory {
-            permissions = CCUtility.getPermissionsValue(byCanEdit: canEdit, andCanCreate: canCreate, andCanChange: canChange, andCanDelete: canDelete, andCanShare: sender.isOn, andIsFolder: metadata.directory)
-        } else {
-            if sender.isOn {
-                if canEdit {
-                    permissions = CCUtility.getPermissionsValue(byCanEdit: true, andCanCreate: true, andCanChange: true, andCanDelete: true, andCanShare: sender.isOn, andIsFolder: metadata.directory)
-                } else {
-                    permissions = CCUtility.getPermissionsValue(byCanEdit: false, andCanCreate: false, andCanChange: false, andCanDelete: false, andCanShare: sender.isOn, andIsFolder: metadata.directory)
-                }
-            } else {
-                if canEdit {
-                    permissions = CCUtility.getPermissionsValue(byCanEdit: true, andCanCreate: true, andCanChange: true, andCanDelete: true, andCanShare: sender.isOn, andIsFolder: metadata.directory)
-                } else {
-                    permissions = CCUtility.getPermissionsValue(byCanEdit: false, andCanCreate: false, andCanChange: false, andCanDelete: false, andCanShare: sender.isOn, andIsFolder: metadata.directory)
-                }
-            }
-        }
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    @IBAction func switchCanCreate(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        guard let metadata = self.metadata else { return }
-
-        let canEdit = CCUtility.isAnyPermission(toEdit: tableShare.permissions)
-        let canChange = CCUtility.isPermission(toCanChange: tableShare.permissions)
-        let canDelete = CCUtility.isPermission(toCanDelete: tableShare.permissions)
-        let canShare = CCUtility.isPermission(toCanShare: tableShare.permissions)
-
-        let permissions = CCUtility.getPermissionsValue(byCanEdit: canEdit, andCanCreate: sender.isOn, andCanChange: canChange, andCanDelete: canDelete, andCanShare: canShare, andIsFolder: metadata.directory)
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    @IBAction func switchCanChange(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        guard let metadata = self.metadata else { return }
-
-        let canEdit = CCUtility.isAnyPermission(toEdit: tableShare.permissions)
-        let canCreate = CCUtility.isPermission(toCanCreate: tableShare.permissions)
-        let canDelete = CCUtility.isPermission(toCanDelete: tableShare.permissions)
-        let canShare = CCUtility.isPermission(toCanShare: tableShare.permissions)
-
-        let permissions = CCUtility.getPermissionsValue(byCanEdit: canEdit, andCanCreate: canCreate, andCanChange: sender.isOn, andCanDelete: canDelete, andCanShare: canShare, andIsFolder: metadata.directory)
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    @IBAction func switchCanDelete(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-        guard let metadata = self.metadata else { return }
-
-        let canEdit = CCUtility.isAnyPermission(toEdit: tableShare.permissions)
-        let canCreate = CCUtility.isPermission(toCanCreate: tableShare.permissions)
-        let canChange = CCUtility.isPermission(toCanChange: tableShare.permissions)
-        let canShare = CCUtility.isPermission(toCanShare: tableShare.permissions)
-
-        let permissions = CCUtility.getPermissionsValue(byCanEdit: canEdit, andCanCreate: canCreate, andCanChange: canChange, andCanDelete: sender.isOn, andCanShare: canShare, andIsFolder: metadata.directory)
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: permissions, note: nil, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    // Set expiration date
-    @IBAction func switchSetExpirationDate(sender: UISwitch) {
-
-        guard let tableShare = self.tableShare else { return }
-
-        if sender.isOn {
-            fieldSetExpirationDate.isEnabled = true
-            fieldSetExpirationDate(sender: fieldSetExpirationDate)
-        } else {
-            networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: nil, label: nil, expirationDate: "", hideDownload: tableShare.hideDownload)
-        }
-    }
-
-    @IBAction func fieldSetExpirationDate(sender: UITextField) {
-
-        let calendar = NCShareCommon.shared.openCalendar(view: self, width: width, height: height)
-        calendar.calendarView.delegate = self
-        self.calendar = calendar.calendarView
-        viewWindowCalendar = calendar.viewWindow
-
-        let tap = UITapGestureRecognizer(target: self, action: #selector(tapViewWindowCalendar))
-        tap.delegate = self
-        viewWindowCalendar?.addGestureRecognizer(tap)
-    }
-
-    // Note to recipient
-    @IBAction func fieldNoteToRecipientDidEndOnExit(textField: UITextField) {
-
-        guard let tableShare = self.tableShare else { return }
-        if fieldNoteToRecipient.text == nil { return }
-
-        networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: fieldNoteToRecipient.text, label: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
-    }
-
-    // Unshare
-    @IBAction func buttonUnshare(sender: UIButton) {
-
-        guard let tableShare = self.tableShare else { return }
-
-        networking?.unShare(idShare: tableShare.idShare)
-    }
-
-    // MARK: - Delegate networking
-
-    func readShareCompleted() {
-        reloadData(idShare: tableShare?.idShare ?? 0)
-    }
-
-    func shareCompleted() {
-        unLoad()
-        NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataNCShare)
-    }
-
-    func unShareCompleted() {
-        unLoad()
-        NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataNCShare)
-    }
-
-    func updateShareWithError(idShare: Int) {
-        reloadData(idShare: idShare)
-    }
-
-    func getSharees(sharees: [NCCommunicationSharee]?) { }
-
-    // MARK: - Delegate calendar
-
-    func calendar(_ calendar: FSCalendar, didSelect date: Date, at monthPosition: FSCalendarMonthPosition) {
-
-        if monthPosition == .previous || monthPosition == .next {
-            calendar.setCurrentPage(date, animated: true)
-        } else {
-            let dateFormatter = DateFormatter()
-            dateFormatter.formatterBehavior = .behavior10_4
-            dateFormatter.dateStyle = .medium
-            fieldSetExpirationDate.text = dateFormatter.string(from: date)
-            fieldSetExpirationDate.endEditing(true)
-
-            viewWindowCalendar?.removeFromSuperview()
-
-            guard let tableShare = self.tableShare else { return }
-
-            dateFormatter.dateFormat = "YYYY-MM-dd HH:mm:ss"
-            let expirationDate = dateFormatter.string(from: date)
-
-            networking?.updateShare(idShare: tableShare.idShare, password: nil, permissions: tableShare.permissions, note: nil, label: nil, expirationDate: expirationDate, hideDownload: tableShare.hideDownload)
-        }
-    }
-
-    func calendar(_ calendar: FSCalendar, shouldSelect date: Date, at monthPosition: FSCalendarMonthPosition) -> Bool {
-        return date > Date()
-    }
-
-    func calendar(_ calendar: FSCalendar, appearance: FSCalendarAppearance, titleDefaultColorFor date: Date) -> UIColor? {
-        return date > Date() ? NCBrandColor.shared.label : NCBrandColor.shared.systemGray3
-    }
-}

+ 0 - 160
iOSClient/Share/NCShareUserMenuView.xib

@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
-    <device id="retina3_5" orientation="portrait" appearance="light"/>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view opaque="NO" contentMode="scaleToFill" id="iN0-l3-epB" customClass="NCShareUserMenuView" customModule="Nextcloud" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="250" height="270"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="sjf-wF-y07">
-                    <rect key="frame" x="10" y="10" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchCanReshareChangedWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="Ezn-AP-uEh"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Can reshare" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IHP-P8-rm2">
-                    <rect key="frame" x="70" y="18" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="lcS-7f-bEg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="dB8-1M-WZr">
-                    <rect key="frame" x="10" y="61" width="51" height="31"/>
-                    <connections>
-                        <action selector="switchSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="valueChanged" id="A9c-YF-bXd"/>
-                    </connections>
-                </switch>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Set expiration date" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qll-9F-4DA">
-                    <rect key="frame" x="70" y="69" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="KyU-PL-PRI"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ymk-0u-ddH">
-                    <rect key="frame" x="70" y="94" width="170" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="30" id="G4f-LN-v7k"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldSetExpirationDateWithSender:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="WdF-Ie-Di0"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="file_txt" translatesAutoresizingMaskIntoConstraints="NO" id="F4T-wQ-tBU">
-                    <rect key="frame" x="13" y="144" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="7uC-w2-XPl"/>
-                        <constraint firstAttribute="width" constant="25" id="YkI-0i-Hbj"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Note to recipient" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="grT-sd-j7q">
-                    <rect key="frame" x="70" y="149" width="175" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gof-GU-toa"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="FyH-3p-EdC">
-                    <rect key="frame" x="70" y="174" width="170" height="34"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                    <textInputTraits key="textInputTraits"/>
-                    <connections>
-                        <action selector="fieldNoteToRecipientDidEndOnExitWithTextField:" destination="iN0-l3-epB" eventType="editingDidEndOnExit" id="q1P-u7-EBw"/>
-                    </connections>
-                </textField>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="trash" translatesAutoresizingMaskIntoConstraints="NO" id="hr8-Qe-xD0" userLabel="Image Delete Share Link">
-                    <rect key="frame" x="13" y="228" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="Ktg-2f-87b"/>
-                        <constraint firstAttribute="width" constant="25" id="ZJu-Y5-U67"/>
-                    </constraints>
-                </imageView>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unshare" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ff4-JE-zGU">
-                    <rect key="frame" x="70" y="233" width="170" height="15"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="15" id="gYi-S0-IOg"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CLA-UL-mYb">
-                    <rect key="frame" x="13" y="228" width="217" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="25" id="fWP-XF-kQx"/>
-                    </constraints>
-                    <connections>
-                        <action selector="buttonUnshareWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="Nky-nT-rCz"/>
-                    </connections>
-                </button>
-            </subviews>
-            <constraints>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="0WP-PE-HTp"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="2RV-rL-sYG"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="centerY" secondItem="F4T-wQ-tBU" secondAttribute="centerY" id="4KH-Py-OgY"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="centerY" secondItem="dB8-1M-WZr" secondAttribute="centerY" id="5QL-7q-jdE"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="top" secondItem="grT-sd-j7q" secondAttribute="bottom" constant="10" id="7al-MO-ezA"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="8lb-ki-xfh"/>
-                <constraint firstAttribute="trailing" secondItem="ymk-0u-ddH" secondAttribute="trailing" constant="10" id="Chd-iQ-EdR"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="EW6-D3-tml"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="centerY" secondItem="sjf-wF-y07" secondAttribute="centerY" id="HiA-pE-L6l"/>
-                <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="10" id="MQ9-xT-wSR"/>
-                <constraint firstAttribute="trailing" secondItem="grT-sd-j7q" secondAttribute="trailing" constant="5" id="Nyn-RD-jTz"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="top" secondItem="sjf-wF-y07" secondAttribute="bottom" constant="20" id="P2C-Pq-hSl"/>
-                <constraint firstAttribute="trailing" secondItem="FyH-3p-EdC" secondAttribute="trailing" constant="10" id="RhU-wl-afT"/>
-                <constraint firstItem="sjf-wF-y07" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="TFC-63-muN"/>
-                <constraint firstItem="FyH-3p-EdC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="TXe-jF-DdS"/>
-                <constraint firstItem="dB8-1M-WZr" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="Ua2-93-05m"/>
-                <constraint firstItem="CLA-UL-mYb" firstAttribute="centerY" secondItem="hr8-Qe-xD0" secondAttribute="centerY" id="Zoj-Ro-jFv"/>
-                <constraint firstAttribute="trailing" secondItem="IHP-P8-rm2" secondAttribute="trailing" constant="10" id="Zsj-Ja-2wq"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="top" secondItem="ymk-0u-ddH" secondAttribute="bottom" constant="20" id="aj8-2w-ySe"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="elF-be-kqS"/>
-                <constraint firstItem="hr8-Qe-xD0" firstAttribute="top" secondItem="FyH-3p-EdC" secondAttribute="bottom" constant="20" id="itX-To-Hbm"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="top" secondItem="qll-9F-4DA" secondAttribute="bottom" constant="10" id="k4G-Yb-xBy"/>
-                <constraint firstItem="grT-sd-j7q" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="lRX-gv-77N"/>
-                <constraint firstAttribute="trailing" secondItem="Ff4-JE-zGU" secondAttribute="trailing" constant="10" id="ljN-WF-OVS"/>
-                <constraint firstAttribute="trailing" secondItem="CLA-UL-mYb" secondAttribute="trailing" constant="20" id="oEb-Su-Nu5"/>
-                <constraint firstItem="qll-9F-4DA" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qEq-8J-iTD"/>
-                <constraint firstItem="ymk-0u-ddH" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qrv-wQ-p6E"/>
-                <constraint firstAttribute="trailing" secondItem="qll-9F-4DA" secondAttribute="trailing" constant="10" id="vaT-9Q-m84"/>
-                <constraint firstItem="F4T-wQ-tBU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="x4S-GE-lJ8"/>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="zc7-db-OeN"/>
-            </constraints>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <connections>
-                <outlet property="buttonUnshare" destination="CLA-UL-mYb" id="fwq-pr-JO0"/>
-                <outlet property="fieldNoteToRecipient" destination="FyH-3p-EdC" id="389-TM-dhC"/>
-                <outlet property="fieldSetExpirationDate" destination="ymk-0u-ddH" id="erm-BP-BWD"/>
-                <outlet property="imageNoteToRecipient" destination="F4T-wQ-tBU" id="hv7-Ln-aYs"/>
-                <outlet property="imageUnshare" destination="hr8-Qe-xD0" id="kfC-D4-Ak0"/>
-                <outlet property="labelCanReshare" destination="IHP-P8-rm2" id="dkZ-O3-1cB"/>
-                <outlet property="labelNoteToRecipient" destination="grT-sd-j7q" id="0Rj-H1-Bqv"/>
-                <outlet property="labelSetExpirationDate" destination="qll-9F-4DA" id="SsD-jd-FX1"/>
-                <outlet property="labelUnshare" destination="Ff4-JE-zGU" id="Ubq-EL-yOd"/>
-                <outlet property="switchCanReshare" destination="sjf-wF-y07" id="3jS-Gr-YMT"/>
-                <outlet property="switchSetExpirationDate" destination="dB8-1M-WZr" id="0Ki-ah-3FE"/>
-            </connections>
-            <point key="canvasLocation" x="2" y="196"/>
-        </view>
-    </objects>
-    <resources>
-        <image name="file_txt" width="300" height="300"/>
-        <image name="trash" width="512" height="512"/>
-    </resources>
-</document>