From: Claudio Cambra Date: Wed, 6 Mar 2024 17:30:57 +0000 (+0800) Subject: Adapt visibility of password field upon toggling password checkbox X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~7^2~46^2~47 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d11cbcaede0eb51761a2cb1c63d67c46b7966332;p=nextcloud-desktop.git Adapt visibility of password field upon toggling password checkbox Signed-off-by: Claudio Cambra --- diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift index 22c3a4696..914f50ee2 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift @@ -10,6 +10,8 @@ import Combine import NextcloudKit import OSLog +// TODO: Handle shareWith! +// TODO: Handle visibility of textfields on relevant checkbox toggle class ShareOptionsView: NSView { @IBOutlet private weak var optionsTitleTextField: NSTextField! @IBOutlet private weak var shareRecipientTextField: NSTextField! // Hide if public link share @@ -133,6 +135,10 @@ class ShareOptionsView: NSView { deleteButton.isEnabled = enabled } + @IBAction func passwordCheckboxAction(_ sender: Any) { + passwordSecureField.isHidden = passwordProtectCheckbox.state == .off + } + @IBAction func save(_ sender: Any) { Task { @MainActor in let password = passwordProtectCheckbox.state == .on diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib index 29d73d925..5d02b3704 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib @@ -294,6 +294,9 @@ + + +