Adapt visibility of note recipient text field upon toggling checkbox
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 12 Mar 2024 06:27:35 +0000 (14:27 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:39:00 +0000 (16:39 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib

index 463a2b36225bc478768ca3175f467ec34a269a84..7201bc564fa69a09187aaeeb0fe6fb21891d23af 100644 (file)
@@ -143,6 +143,10 @@ class ShareOptionsView: NSView {
         expirationDatePicker.isHidden = expirationDateCheckbox.state == .off
     }
 
+    @IBAction func noteForRecipientCheckboxAction(_ sender: Any) {
+        noteTextField.isHidden = noteForRecipientCheckbox.state == .off
+    }
+
     @IBAction func save(_ sender: Any) {
         Task { @MainActor in
             let password = passwordProtectCheckbox.state == .on
index 3f016279467865bb7ef8ed9f865e7f38991d540f..857d01cbb3ebf9662558a1ec2035ffe5faf82167 100644 (file)
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                                                 <font key="font" metaFont="system"/>
                                             </buttonCell>
+                                            <connections>
+                                                <action selector="noteForRecipientCheckboxAction:" target="EXb-m8-yzj" id="j7a-Tc-uiu"/>
+                                            </connections>
                                         </button>
                                         <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="io6-Kg-fLl">
                                             <rect key="frame" x="0.0" y="25" width="460" height="22"/>