mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
Custom fields now correctly are hidden/displayed when protected attribute is set
This commit is contained in:
2
Cartfile
2
Cartfile
@@ -1,3 +1,3 @@
|
|||||||
github "sparkle-project/Sparkle" ~> 1.18.1
|
github "sparkle-project/Sparkle" ~> 1.18.1
|
||||||
github "mstarke/KeePassKit" ~> 1.4.1
|
github "MacPass/KeePassKit" ~> 1.5
|
||||||
github "mstarke/HNHUi" ~> 1.4.1
|
github "mstarke/HNHUi" ~> 1.4.1
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
|
github "MacPass/KeePassKit" "1.5"
|
||||||
github "mstarke/HNHUi" "1.4.1"
|
github "mstarke/HNHUi" "1.4.1"
|
||||||
github "mstarke/KeePassKit" "1.4.1"
|
|
||||||
github "sparkle-project/Sparkle" "1.18.1"
|
github "sparkle-project/Sparkle" "1.18.1"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#import "MPCustomFieldTableViewDelegate.h"
|
#import "MPCustomFieldTableViewDelegate.h"
|
||||||
#import "MPCustomFieldTableCellView.h"
|
#import "MPCustomFieldTableCellView.h"
|
||||||
#import "MPEntryInspectorViewController.h"
|
#import "MPEntryInspectorViewController.h"
|
||||||
|
#import "HNHUi/HNHUi.h"
|
||||||
#import "KeePassKit/KeePassKit.h"
|
#import "KeePassKit/KeePassKit.h"
|
||||||
|
|
||||||
@implementation MPCustomFieldTableViewDelegate
|
@implementation MPCustomFieldTableViewDelegate
|
||||||
@@ -44,6 +44,11 @@
|
|||||||
withKeyPath:@"objectValue.isProtected"
|
withKeyPath:@"objectValue.isProtected"
|
||||||
options:nil];
|
options:nil];
|
||||||
|
|
||||||
|
[view.valueTextField bind:NSStringFromSelector(@selector(showPassword))
|
||||||
|
toObject:view
|
||||||
|
withKeyPath:@"objectValue.isProtected"
|
||||||
|
options:@{NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName}];
|
||||||
|
|
||||||
|
|
||||||
for(NSControl *control in @[view.labelTextField, view.valueTextField, view.removeButton, view.protectedButton ]) {
|
for(NSControl *control in @[view.labelTextField, view.valueTextField, view.removeButton, view.protectedButton ]) {
|
||||||
[control bind:NSEnabledBinding
|
[control bind:NSEnabledBinding
|
||||||
|
|||||||
Reference in New Issue
Block a user