mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Adapt visibility of password field upon toggling password checkbox
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
d12cdebf48
commit
4be8bace48
@ -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
|
||||
|
||||
@ -294,6 +294,9 @@
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="passwordCheckboxAction:" target="EXb-m8-yzj" id="QMn-RM-jdf"/>
|
||||
</connections>
|
||||
</button>
|
||||
<secureTextField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pkv-9L-nhv">
|
||||
<rect key="frame" x="0.0" y="123" width="460" height="22"/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user