Adapt visibility of expiration date field upon toggling checkbox
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 6 Mar 2024 18:00:41 +0000 (02:00 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:38:59 +0000 (16:38 +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 914f50ee23f549714a2355dbe6fdca3f43855774..463a2b36225bc478768ca3175f467ec34a269a84 100644 (file)
@@ -139,6 +139,10 @@ class ShareOptionsView: NSView {
         passwordSecureField.isHidden = passwordProtectCheckbox.state == .off
     }
 
+    @IBAction func expirationDateCheckboxAction(_ sender: Any) {
+        expirationDatePicker.isHidden = expirationDateCheckbox.state == .off
+    }
+
     @IBAction func save(_ sender: Any) {
         Task { @MainActor in
             let password = passwordProtectCheckbox.state == .on
index 5d02b3704cd181aa605d01d4cf047308d9a5ec25..3f016279467865bb7ef8ed9f865e7f38991d540f 100644 (file)
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                                                 <font key="font" metaFont="system"/>
                                             </buttonCell>
+                                            <connections>
+                                                <action selector="expirationDateCheckboxAction:" target="EXb-m8-yzj" id="KHG-U0-rsG"/>
+                                            </connections>
                                         </button>
                                         <datePicker verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="46m-5F-ME5">
                                             <rect key="frame" x="0.0" y="73" width="463" height="28"/>