瀏覽代碼

new view share

marinofaggiana 5 年之前
父節點
當前提交
cb44c112b9
共有 3 個文件被更改,包括 115 次插入60 次删除
  1. 22 2
      iOSClient/Database/NCManageDatabase.swift
  2. 27 13
      iOSClient/Share/NCShare.swift
  3. 66 45
      iOSClient/Share/NCShareLinkMenuView.xib

+ 22 - 2
iOSClient/Database/NCManageDatabase.swift

@@ -2335,10 +2335,10 @@ class NCManageDatabase: NSObject {
         
         let firstShareLink = realm.objects(tableShare.self).filter("account == %@ AND serverUrl == %@ AND fileName == %@ AND shareType == %d", metadata.account, metadata.serverUrl, metadata.fileName, Int(shareTypeLink.rawValue)).first
         if firstShareLink == nil {
-            let results = realm.objects(tableShare.self).filter("account == %@ AND serverUrl == %@ AND fileName == %@", metadata.account, metadata.serverUrl, metadata.fileName).sorted(byKeyPath: "idRemoteShared", ascending: true)
+            let results = realm.objects(tableShare.self).filter("account == %@ AND serverUrl == %@ AND fileName == %@", metadata.account, metadata.serverUrl, metadata.fileName).sorted(byKeyPath: "shareType", ascending: false)
             return(firstShareLink: firstShareLink, share: Array(results.map { tableShare.init(value:$0) }))
         } else {
-            let results = realm.objects(tableShare.self).filter("account == %@ AND serverUrl == %@ AND fileName == %@ AND idRemoteShared != %d", metadata.account, metadata.serverUrl, metadata.fileName, firstShareLink!.idRemoteShared).sorted(byKeyPath: "idRemoteShared", ascending: true)
+            let results = realm.objects(tableShare.self).filter("account == %@ AND serverUrl == %@ AND fileName == %@ AND idRemoteShared != %d", metadata.account, metadata.serverUrl, metadata.fileName, firstShareLink!.idRemoteShared).sorted(byKeyPath: "shareType", ascending: false)
             return(firstShareLink: firstShareLink, share: Array(results.map { tableShare.init(value:$0) }))
         }
     }
@@ -2375,6 +2375,26 @@ class NCManageDatabase: NSObject {
         return Array(results.map { tableShare.init(value:$0) })
     }
     
+    @objc func deleteTableShare(account: String, idRemoteShared: Int) {
+        
+        let realm = try! Realm()
+        
+        realm.beginWrite()
+        
+        guard let result = realm.objects(tableShare.self).filter("account == %@ AND idRemoteShared == %d", account, idRemoteShared).first else {
+            realm.cancelWrite()
+            return
+        }
+        
+        realm.delete(result)
+        
+        do {
+            try realm.commitWrite()
+        } catch let error {
+            print("[LOG] Could not write to database: ", error)
+        }
+    }
+    
     //MARK: -
     //MARK: Table Tag
     

+ 27 - 13
iOSClient/Share/NCShare.swift

@@ -265,6 +265,8 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDel
         
         tableView.register(UINib.init(nibName: "NCShareLinkCell", bundle: nil), forCellReuseIdentifier: "cellLink")
         
+        NotificationCenter.default.addObserver(self, selector: #selector(self.reloadData), name: NSNotification.Name(rawValue: "reloadDataNCShare"), object: nil)
+        
         reloadData()
     }
     
@@ -294,7 +296,7 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDel
         NCShareCommon.sharedInstance.openViewMenuShareLink(view: self.view, height: height, tableShare: tableShare, metadata: metadata!)
     }
     
-    func reloadData() {
+    @objc func reloadData() {
         let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata!)
         if shares.firstShareLink == nil {
             buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareAdd"), width: 100, height: 100, color: UIColor.gray), for: .normal)
@@ -303,6 +305,7 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDel
             buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMenu"), width: 100, height: 100, color: UIColor.gray), for: .normal)
             buttonCopy.isHidden = false
         }
+        tableView.reloadData()
     }
 }
 
@@ -409,10 +412,12 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
 
     @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
 
     public let width: CGFloat = 250
@@ -445,7 +450,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
         textViewNoteToRecipient.layer.cornerRadius = 5
 
         imageNoteToRecipient.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "file_txt"), width: 100, height: 100, color: UIColor.black)
-        buttonDeleteShareLink.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "trash"), width: 100, height: 100, color: UIColor.black), for: .normal)
+        imageDeleteShareLink.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "trash"), width: 100, height: 100, color: UIColor.black)
         buttonAddAnotherLink.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "add"), width: 100, height: 100, color: UIColor.black), for: .normal)
     }
     
@@ -465,7 +470,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
         return gestureRecognizer.view == touch.view
     }
     
-    func loadData(idRemoteShared: Int) {
+    func reloadData(idRemoteShared: Int) {
         tableShare = NCManageDatabase.sharedInstance.getTableShare(account: metadata!.account, idRemoteShared: idRemoteShared)
         
         // Allow editing
@@ -572,22 +577,31 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
         networking.updateShare(idRemoteShared: tableShare.idRemoteShared, password: nil, permission: 0, note: textViewNoteToRecipient.text, expirationTime: nil, hideDownload: tableShare.hideDownload)
     }
     
+    @IBAction func buttonDeleteShareLink(sender: UIButton) {
+        
+        guard let tableShare = self.tableShare else { return }
+        let networking = NCShareNetworking.init(account: metadata!.account, activeUrl: appDelegate.activeUrl,  view: self, delegate: self)
+
+        networking.unShare(idRemoteShared: tableShare.idRemoteShared)
+    }
+    
     // delegate networking
     
     func readShareCompleted() {
-        loadData(idRemoteShared: tableShare?.idRemoteShared ?? 0)
+        reloadData(idRemoteShared: tableShare?.idRemoteShared ?? 0)
     }
     
     func shareCompleted(metadata: tableMetadata, errorCode: Int) {
         
     }
     
-    func unShareCompleted(account: String, idRemoteShared: Int, errorCode: Int) {
-        
+    func unShareCompleted() {
+        viewWindow?.removeFromSuperview()
+        NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadDataNCShare"), object: nil, userInfo: nil)
     }
     
     func updateShareError(idRemoteShared: Int) {
-        loadData(idRemoteShared: idRemoteShared)
+        reloadData(idRemoteShared: idRemoteShared)
     }
 }
 
@@ -627,7 +641,7 @@ class NCShareCommon: NSObject {
         let shareLinkMenuView = Bundle.main.loadNibNamed("NCShareLinkMenuView", owner: self, options: nil)?.first as? NCShareLinkMenuView
         shareLinkMenuView?.addTap(view: viewWindow)
         shareLinkMenuView?.metadata = metadata
-        shareLinkMenuView?.loadData(idRemoteShared: tableShare?.idRemoteShared ?? 0)
+        shareLinkMenuView?.reloadData(idRemoteShared: tableShare?.idRemoteShared ?? 0)
         let shareLinkMenuViewX = view.bounds.width - (shareLinkMenuView?.frame.width)! - 40 + globalPoint!.x
         var shareLinkMenuViewY = height + 10 + globalPoint!.y
         if (view.bounds.height - (height + 10))  < shareLinkMenuView!.height {
@@ -715,11 +729,11 @@ class NCShareNetworking: NSObject {
         OCNetworking.sharedManager()?.unshareAccount(account, shareID: idRemoteShared, completion: { (account, message, errorCode) in
             NCUtility.sharedInstance.stopActivityIndicator()
             if errorCode == 0 {
-                
+                NCManageDatabase.sharedInstance.deleteTableShare(account: account!, idRemoteShared: idRemoteShared)
+                self.delegate?.unShareCompleted()
             } else {
                 self.appDelegate.messageNotification("_share_", description: message, visible: true, delay: TimeInterval(k_dismissAfterSecond), type: TWMessageBarMessageType.error, errorCode: errorCode)
             }
-            self.delegate?.unShareCompleted(account: account!, idRemoteShared: idRemoteShared, errorCode: errorCode)
         })
     }
     
@@ -740,6 +754,6 @@ class NCShareNetworking: NSObject {
 protocol NCShareNetworkingDelegate {
     func readShareCompleted()
     func shareCompleted(metadata: tableMetadata, errorCode: Int)
-    func unShareCompleted(account: String, idRemoteShared: Int, errorCode: Int)
+    func unShareCompleted()
     func updateShareError(idRemoteShared: Int)
 }

+ 66 - 45
iOSClient/Share/NCShareLinkMenuView.xib

@@ -22,7 +22,7 @@
                     </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="69" y="18" width="241" height="15"/>
+                    <rect key="frame" x="70" y="18" width="240" height="15"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="15" id="lcS-7f-bEg"/>
                     </constraints>
@@ -37,7 +37,7 @@
                     </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="69" y="69" width="241" height="15"/>
+                    <rect key="frame" x="70" y="69" width="240" height="15"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="15" id="IEP-cO-Um6"/>
                     </constraints>
@@ -52,7 +52,7 @@
                     </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="69" y="120" width="241" height="15"/>
+                    <rect key="frame" x="70" y="120" width="240" height="15"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="15" id="MeH-bs-tZK"/>
                     </constraints>
@@ -69,11 +69,22 @@
                     <fontDescription key="fontDescription" type="system" pointSize="13"/>
                     <textInputTraits key="textInputTraits" secureTextEntry="YES" textContentType="password"/>
                 </textField>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SzO-tO-ghG" userLabel="Button Send Password Protect">
+                    <rect key="frame" x="285" y="147.5" width="25" height="25"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="25" id="aMX-i0-PEo"/>
+                        <constraint firstAttribute="height" constant="25" id="qlO-39-F5h"/>
+                    </constraints>
+                    <state key="normal" image="arrowRight"/>
+                    <connections>
+                        <action selector="buttonSendPasswordProtectWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="LXR-OO-e8e"/>
+                    </connections>
+                </button>
                 <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="195" width="51" height="31"/>
                 </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="69" y="203" width="241" height="15"/>
+                    <rect key="frame" x="70" y="203" width="240" height="15"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="15" id="KyU-PL-PRI"/>
                     </constraints>
@@ -98,7 +109,7 @@
                     </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="69" y="283" width="246" height="15"/>
+                    <rect key="frame" x="70" y="283" width="245" height="15"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="15" id="gof-GU-toa"/>
                     </constraints>
@@ -106,6 +117,17 @@
                     <nil key="textColor"/>
                     <nil key="highlightedColor"/>
                 </label>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AXE-ta-uC8">
+                    <rect key="frame" x="285" y="278" width="25" height="25"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="25" id="WjG-39-aup"/>
+                        <constraint firstAttribute="width" constant="25" id="zKE-Fg-nWa"/>
+                    </constraints>
+                    <state key="normal" image="arrowRight"/>
+                    <connections>
+                        <action selector="buttonSendNoteToRecipientWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="hxy-ND-ZKC"/>
+                    </connections>
+                </button>
                 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="hvx-5m-jip">
                     <rect key="frame" x="64" y="308" width="246" height="50"/>
                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -116,16 +138,15 @@
                     <fontDescription key="fontDescription" type="system" pointSize="13"/>
                     <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
                 </textView>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CLA-UL-mYb">
+                <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="378" width="25" height="25"/>
                     <constraints>
-                        <constraint firstAttribute="width" constant="25" id="XDw-5r-2dP"/>
-                        <constraint firstAttribute="height" constant="25" id="fWP-XF-kQx"/>
+                        <constraint firstAttribute="height" constant="25" id="Ktg-2f-87b"/>
+                        <constraint firstAttribute="width" constant="25" id="ZJu-Y5-U67"/>
                     </constraints>
-                    <state key="normal" image="trash"/>
-                </button>
+                </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="69" y="383" width="241" height="15"/>
+                    <rect key="frame" x="70" y="383" width="240" height="15"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="15" id="gYi-S0-IOg"/>
                     </constraints>
@@ -133,16 +154,24 @@
                     <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="433" width="25" height="25"/>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CLA-UL-mYb">
+                    <rect key="frame" x="13" y="378" width="287" height="25"/>
                     <constraints>
-                        <constraint firstAttribute="width" constant="25" id="jn9-Sf-5OM"/>
-                        <constraint firstAttribute="height" constant="25" id="wQO-6d-vWV"/>
+                        <constraint firstAttribute="height" constant="25" id="fWP-XF-kQx"/>
                     </constraints>
-                    <state key="normal" image="add"/>
+                    <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="433" 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="69" y="438" width="241" height="15"/>
+                    <rect key="frame" x="70" y="438" width="240" height="15"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="15" id="p9o-oI-gWq"/>
                     </constraints>
@@ -150,32 +179,18 @@
                     <nil key="textColor"/>
                     <nil key="highlightedColor"/>
                 </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SzO-tO-ghG" userLabel="Button Send Password Protect">
-                    <rect key="frame" x="285" y="147.5" width="25" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="25" id="aMX-i0-PEo"/>
-                        <constraint firstAttribute="height" constant="25" id="qlO-39-F5h"/>
-                    </constraints>
-                    <state key="normal" image="arrowRight"/>
-                    <connections>
-                        <action selector="buttonSendPasswordProtectWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="LXR-OO-e8e"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AXE-ta-uC8" userLabel="Button Send Password Protect">
-                    <rect key="frame" x="285" y="278" width="25" height="25"/>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0bK-Kl-hcs">
+                    <rect key="frame" x="13" y="433" width="287" height="25"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="25" id="WjG-39-aup"/>
-                        <constraint firstAttribute="width" constant="25" id="zKE-Fg-nWa"/>
+                        <constraint firstAttribute="height" constant="25" id="wQO-6d-vWV"/>
                     </constraints>
-                    <state key="normal" image="arrowRight"/>
-                    <connections>
-                        <action selector="buttonSendNoteToRecipientWithSender:" destination="iN0-l3-epB" eventType="touchUpInside" id="hxy-ND-ZKC"/>
-                    </connections>
                 </button>
             </subviews>
             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
                 <constraint firstItem="e1F-PV-32s" firstAttribute="leading" secondItem="HDO-WC-RvJ" secondAttribute="trailing" constant="10" id="0Un-2w-9a3"/>
+                <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="AXE-ta-uC8" firstAttribute="centerY" secondItem="F4T-wQ-tBU" secondAttribute="centerY" id="53F-eV-3Jo"/>
                 <constraint firstItem="qll-9F-4DA" firstAttribute="centerY" secondItem="dB8-1M-WZr" secondAttribute="centerY" id="5QL-7q-jdE"/>
@@ -183,55 +198,61 @@
                 <constraint firstItem="hvx-5m-jip" firstAttribute="leading" secondItem="F4T-wQ-tBU" secondAttribute="trailing" constant="26" id="AG8-gi-XVa"/>
                 <constraint firstItem="0bK-Kl-hcs" firstAttribute="top" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="30" 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="sjf-wF-y07" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="EW6-D3-tml"/>
                 <constraint firstItem="UIn-eq-hkP" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="FwN-Rj-koX"/>
-                <constraint firstItem="Ff4-JE-zGU" firstAttribute="leading" secondItem="CLA-UL-mYb" secondAttribute="trailing" constant="31" id="Fzp-Qw-dGx"/>
                 <constraint firstItem="HDO-WC-RvJ" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="GTl-Tq-cLY"/>
+                <constraint firstItem="hr8-Qe-xD0" firstAttribute="top" secondItem="hvx-5m-jip" secondAttribute="bottom" constant="20" id="GYz-q0-lcL"/>
                 <constraint firstItem="IHP-P8-rm2" firstAttribute="centerY" secondItem="sjf-wF-y07" secondAttribute="centerY" id="HiA-pE-L6l"/>
-                <constraint firstItem="cna-iK-PD7" firstAttribute="leading" secondItem="0bK-Kl-hcs" secondAttribute="trailing" constant="31" id="Hic-qB-F0O"/>
+                <constraint firstItem="6SU-Ak-Q7m" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="Hqf-wy-u3S"/>
                 <constraint firstAttribute="trailing" secondItem="AXE-ta-uC8" secondAttribute="trailing" constant="10" id="J2I-36-ULj"/>
+                <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 firstItem="ymk-0u-ddH" firstAttribute="leading" secondItem="dB8-1M-WZr" secondAttribute="trailing" constant="10" id="Nka-wr-Yvi"/>
                 <constraint firstAttribute="trailing" secondItem="grT-sd-j7q" secondAttribute="trailing" constant="5" id="Nyn-RD-jTz"/>
-                <constraint firstItem="HaY-OM-mQh" firstAttribute="leading" secondItem="HDO-WC-RvJ" secondAttribute="trailing" constant="10" id="R82-ZK-rEC"/>
+                <constraint firstItem="6SU-Ak-Q7m" firstAttribute="top" secondItem="CLA-UL-mYb" secondAttribute="bottom" constant="30" id="OU0-vG-YTq"/>
                 <constraint firstItem="CLA-UL-mYb" firstAttribute="top" secondItem="hvx-5m-jip" secondAttribute="bottom" constant="20" id="RkO-Rt-2Z2"/>
-                <constraint firstItem="IHP-P8-rm2" firstAttribute="leading" secondItem="sjf-wF-y07" secondAttribute="trailing" constant="10" id="RtP-OI-XwJ"/>
                 <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="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 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="qll-9F-4DA" firstAttribute="leading" secondItem="dB8-1M-WZr" secondAttribute="trailing" constant="10" id="ciQ-HO-5Lo"/>
                 <constraint firstItem="HDO-WC-RvJ" firstAttribute="top" secondItem="UIn-eq-hkP" secondAttribute="bottom" constant="20" id="dex-mb-oRg"/>
+                <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="SzO-tO-ghG" firstAttribute="leading" secondItem="e1F-PV-32s" secondAttribute="trailing" constant="10" id="g64-FV-9Ja"/>
-                <constraint firstItem="KXo-cP-gkc" firstAttribute="leading" secondItem="UIn-eq-hkP" secondAttribute="trailing" constant="10" id="grU-Jx-SqH"/>
                 <constraint firstItem="SzO-tO-ghG" firstAttribute="centerY" secondItem="e1F-PV-32s" secondAttribute="centerY" id="hgY-1O-212"/>
                 <constraint firstItem="Ff4-JE-zGU" firstAttribute="centerY" secondItem="CLA-UL-mYb" secondAttribute="centerY" id="htT-Up-zbh"/>
                 <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="F4T-wQ-tBU" secondAttribute="trailing" constant="31" id="kLi-Zi-SmS"/>
+                <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="SzO-tO-ghG" secondAttribute="trailing" constant="10" id="mh2-EL-jLh"/>
+                <constraint firstAttribute="trailing" secondItem="CLA-UL-mYb" secondAttribute="trailing" constant="20" id="oEb-Su-Nu5"/>
                 <constraint firstAttribute="trailing" secondItem="hvx-5m-jip" secondAttribute="trailing" constant="10" id="pIn-yh-w1o"/>
+                <constraint firstItem="qll-9F-4DA" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="70" id="qEq-8J-iTD"/>
                 <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="hvx-5m-jip" firstAttribute="top" secondItem="grT-sd-j7q" secondAttribute="bottom" constant="10" id="wuG-4i-FDE"/>
                 <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>
             <connections>
                 <outlet property="buttonAddAnotherLink" destination="0bK-Kl-hcs" id="XMo-Cp-y6f"/>
-                <outlet property="buttonDeleteShareLink" destination="CLA-UL-mYb" id="epa-ZP-1vw"/>
+                <outlet property="buttonDeleteShareLink" destination="CLA-UL-mYb" id="LVP-Vh-RHb"/>
                 <outlet property="buttonSendNoteToRecipient" destination="AXE-ta-uC8" id="hAe-F8-ybi"/>
                 <outlet property="buttonSendPasswordProtect" destination="SzO-tO-ghG" id="bgm-IF-zmu"/>
                 <outlet property="fieldPasswordProtect" destination="e1F-PV-32s" id="c1Y-0f-UYD"/>
                 <outlet property="fieldSetExpirationDate" destination="ymk-0u-ddH" id="W6o-xf-Zj2"/>
-                <outlet property="imageNoteToRecipient" destination="F4T-wQ-tBU" id="F4t-ay-Ub8"/>
+                <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"/>