mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 22:52:26 +00:00
enhanced naming of password input properties
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13196" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13196"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -10,9 +10,9 @@
|
||||
<connections>
|
||||
<outlet property="cancelButton" destination="2pb-ZG-spA" id="YrR-Yi-dnQ"/>
|
||||
<outlet property="enablePasswordCheckBox" destination="d8O-Ha-rrS" id="2AI-e9-sph"/>
|
||||
<outlet property="errorImageView" destination="262" id="294"/>
|
||||
<outlet property="errorInfoTextField" destination="268" id="67b-K9-DZd"/>
|
||||
<outlet property="keyPathControl" destination="241" id="261"/>
|
||||
<outlet property="messageImageView" destination="262" id="726-wK-c2h"/>
|
||||
<outlet property="messageInfoTextField" destination="268" id="ahE-sq-QzR"/>
|
||||
<outlet property="passwordTextField" destination="338" id="495"/>
|
||||
<outlet property="togglePasswordButton" destination="408" id="493"/>
|
||||
<outlet property="unlockButton" destination="2" id="ZRr-Ui-ExP"/>
|
||||
@@ -148,12 +148,14 @@ Gw
|
||||
<constraint firstItem="2" firstAttribute="trailing" secondItem="486" secondAttribute="trailing" id="496"/>
|
||||
<constraint firstItem="408" firstAttribute="leading" secondItem="338" secondAttribute="trailing" constant="8" symbolic="YES" id="7qE-8F-QgB"/>
|
||||
<constraint firstItem="2pb-ZG-spA" firstAttribute="baseline" secondItem="2" secondAttribute="baseline" id="9nK-MH-Ozs"/>
|
||||
<constraint firstItem="17" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="EOa-K4-v7J"/>
|
||||
<constraint firstItem="338" firstAttribute="leading" secondItem="d8O-Ha-rrS" secondAttribute="trailing" constant="8" symbolic="YES" id="KYs-Ia-SVl"/>
|
||||
<constraint firstItem="2pb-ZG-spA" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="SUS-76-os4"/>
|
||||
<constraint firstItem="d8O-Ha-rrS" firstAttribute="centerY" secondItem="338" secondAttribute="centerY" id="kgB-jV-OGy"/>
|
||||
<constraint firstItem="d8O-Ha-rrS" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="vxq-YP-UhR"/>
|
||||
<constraint firstItem="2" firstAttribute="leading" secondItem="2pb-ZG-spA" secondAttribute="trailing" constant="12" id="ytJ-5Z-5rT"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-240" y="25"/>
|
||||
<point key="canvasLocation" x="54" y="45"/>
|
||||
</customView>
|
||||
<customObject id="MfG-kk-cQe" customClass="MPKeyfilePathControlDelegate"/>
|
||||
</objects>
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
@property (weak) IBOutlet HNHUIRoundedSecureTextField *passwordTextField;
|
||||
@property (weak) IBOutlet NSPathControl *keyPathControl;
|
||||
@property (weak) IBOutlet NSImageView *errorImageView;
|
||||
@property (weak) IBOutlet NSTextField *errorInfoTextField;
|
||||
@property (weak) IBOutlet NSImageView *messageImageView;
|
||||
@property (weak) IBOutlet NSTextField *messageInfoTextField;
|
||||
@property (weak) IBOutlet NSButton *togglePasswordButton;
|
||||
@property (weak) IBOutlet NSButton *enablePasswordCheckBox;
|
||||
@property (weak) IBOutlet NSButton *unlockButton;
|
||||
@@ -70,7 +70,7 @@
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
self.errorImageView.image = [NSImage imageNamed:NSImageNameCaution];
|
||||
self.messageImageView.image = [NSImage imageNamed:NSImageNameCaution];
|
||||
[self.passwordTextField bind:NSStringFromSelector(@selector(showPassword)) toObject:self withKeyPath:NSStringFromSelector(@selector(showPassword)) options:nil];
|
||||
[self.togglePasswordButton bind:NSValueBinding toObject:self withKeyPath:NSStringFromSelector(@selector(showPassword)) options:nil];
|
||||
[self.enablePasswordCheckBox bind:NSValueBinding toObject:self withKeyPath:NSStringFromSelector(@selector(enablePassword)) options:nil];
|
||||
@@ -151,11 +151,11 @@
|
||||
self.showPassword = NO;
|
||||
self.enablePassword = YES;
|
||||
self.passwordTextField.stringValue = @"";
|
||||
self.errorInfoTextField.hidden = (nil == self.message);
|
||||
self.messageInfoTextField.hidden = (nil == self.message);
|
||||
if(self.message) {
|
||||
self.errorInfoTextField.stringValue = self.message;
|
||||
self.messageInfoTextField.stringValue = self.message;
|
||||
}
|
||||
self.errorImageView.hidden = (nil == self.message);;
|
||||
self.messageImageView.hidden = (nil == self.message);;
|
||||
self.cancelButton.hidden = (nil == self.cancelLabel);
|
||||
if(self.cancelLabel) {
|
||||
self.cancelButton.stringValue = self.cancelLabel;
|
||||
@@ -170,10 +170,10 @@
|
||||
|
||||
- (void)_showError:(NSError *)error {
|
||||
if(error) {
|
||||
self.errorInfoTextField.stringValue = error.descriptionForErrorCode;
|
||||
self.messageInfoTextField.stringValue = error.descriptionForErrorCode;
|
||||
}
|
||||
self.errorImageView.hidden = NO;
|
||||
self.errorInfoTextField.hidden = NO;
|
||||
self.messageImageView.hidden = NO;
|
||||
self.messageInfoTextField.hidden = NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSUserNotificationAlertStyle</key>
|
||||
<string>alert</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
@@ -79,6 +77,8 @@
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
<key>NSUserNotificationAlertStyle</key>
|
||||
<string>alert</string>
|
||||
<key>SUFeedURL</key>
|
||||
<string>https://raw.githubusercontent.com/MacPass/MacPassUpdates/master/appcast_macpass.xml</string>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
|
||||
Reference in New Issue
Block a user