mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +00:00
Fixed #18. Passwords are now displayed as 8-dots or empy
This commit is contained in:
13
MacPass/MPAssociateRequestHandler.h
Normal file
13
MacPass/MPAssociateRequestHandler.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// MPAssociateRequestHandler.h
|
||||||
|
// MacPass
|
||||||
|
//
|
||||||
|
// Created by Michael Starke on 17.06.13.
|
||||||
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@interface MPAssociateRequestHandler : NSObject
|
||||||
|
|
||||||
|
@end
|
||||||
13
MacPass/MPAssociateRequestHandler.m
Normal file
13
MacPass/MPAssociateRequestHandler.m
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// MPAssociateRequestHandler.m
|
||||||
|
// MacPass
|
||||||
|
//
|
||||||
|
// Created by Michael Starke on 17.06.13.
|
||||||
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MPAssociateRequestHandler.h"
|
||||||
|
|
||||||
|
@implementation MPAssociateRequestHandler
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -15,15 +15,19 @@
|
|||||||
#import "MPDocumentWindowController.h"
|
#import "MPDocumentWindowController.h"
|
||||||
#import "MPPasteBoardController.h"
|
#import "MPPasteBoardController.h"
|
||||||
#import "MPOverlayWindowController.h"
|
#import "MPOverlayWindowController.h"
|
||||||
#import "KdbGroup+MPTreeTools.h"
|
|
||||||
#import "KdbGroup+Undo.h"
|
|
||||||
#import "KdbEntry+Undo.h"
|
|
||||||
#import "MPContextMenuHelper.h"
|
#import "MPContextMenuHelper.h"
|
||||||
#import "MPConstants.h"
|
#import "MPConstants.h"
|
||||||
#import "MPEntryTableDataSource.h"
|
#import "MPEntryTableDataSource.h"
|
||||||
|
#import "MPStringLengthValueTransformer.h"
|
||||||
|
|
||||||
#import "HNHTableHeaderCell.h"
|
#import "HNHTableHeaderCell.h"
|
||||||
#import "HNHGradientView.h"
|
#import "HNHGradientView.h"
|
||||||
|
|
||||||
|
#import "KdbGroup+MPTreeTools.h"
|
||||||
|
#import "KdbGroup+Undo.h"
|
||||||
|
#import "KdbEntry+Undo.h"
|
||||||
|
|
||||||
NSString *const MPDidChangeSelectedEntryNotification = @"com.macpass.MPDidChangeSelectedEntryNotification";
|
NSString *const MPDidChangeSelectedEntryNotification = @"com.macpass.MPDidChangeSelectedEntryNotification";
|
||||||
|
|
||||||
#define STATUS_BAR_ANIMATION_TIME 0.2
|
#define STATUS_BAR_ANIMATION_TIME 0.2
|
||||||
@@ -194,7 +198,8 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
|||||||
}
|
}
|
||||||
else if( isPasswordColum ) {
|
else if( isPasswordColum ) {
|
||||||
view = [tableView makeViewWithIdentifier:_MPTAbleSecurCellView owner:self];
|
view = [tableView makeViewWithIdentifier:_MPTAbleSecurCellView owner:self];
|
||||||
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:MPEntryPasswordUndoableKey options:nil];
|
NSDictionary *options = @{ NSValueTransformerBindingOption : [NSValueTransformer valueTransformerForName:MPStringLengthValueTransformerName] };
|
||||||
|
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:MPEntryPasswordUndoableKey options:options];
|
||||||
}
|
}
|
||||||
else if( isUsernameColumn || isURLColumn ) {
|
else if( isUsernameColumn || isURLColumn ) {
|
||||||
view = [tableView makeViewWithIdentifier:_MPTableStringCellView owner:self];
|
view = [tableView makeViewWithIdentifier:_MPTableStringCellView owner:self];
|
||||||
|
|||||||
13
MacPass/MPServerRequestHandler.h
Normal file
13
MacPass/MPServerRequestHandler.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// MPServerRequestHandler.h
|
||||||
|
// MacPass
|
||||||
|
//
|
||||||
|
// Created by Michael Starke on 17.06.13.
|
||||||
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@protocol MPServerRequestHandler <NSObject>
|
||||||
|
|
||||||
|
@end
|
||||||
17
MacPass/MPStringLengthValueTransformer.h
Normal file
17
MacPass/MPStringLengthValueTransformer.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// MPStringLengthValueTransformer.h
|
||||||
|
// MacPass
|
||||||
|
//
|
||||||
|
// Created by Michael Starke on 17.06.13.
|
||||||
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
APPKIT_EXTERN NSString *const MPStringLengthValueTransformerName;
|
||||||
|
|
||||||
|
@interface MPStringLengthValueTransformer : NSValueTransformer
|
||||||
|
|
||||||
|
+ (void)registerTransformer;
|
||||||
|
|
||||||
|
@end
|
||||||
39
MacPass/MPStringLengthValueTransformer.m
Normal file
39
MacPass/MPStringLengthValueTransformer.m
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//
|
||||||
|
// MPStringLengthValueTransformer.m
|
||||||
|
// MacPass
|
||||||
|
//
|
||||||
|
// Created by Michael Starke on 17.06.13.
|
||||||
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MPStringLengthValueTransformer.h"
|
||||||
|
#define CROP_LENGHT 10;
|
||||||
|
|
||||||
|
NSString *const MPStringLengthValueTransformerName = @"com.hicknhack.macpass.MPMPStringLengthValueTransformer";
|
||||||
|
|
||||||
|
@implementation MPStringLengthValueTransformer
|
||||||
|
|
||||||
|
+ (Class)transformedValueClass {
|
||||||
|
return [NSString class];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (BOOL)allowsReverseTransformation {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void)registerTransformer {
|
||||||
|
MPStringLengthValueTransformer *transformer = [[MPStringLengthValueTransformer alloc] init];
|
||||||
|
[NSValueTransformer setValueTransformer:transformer
|
||||||
|
forName:MPStringLengthValueTransformerName];
|
||||||
|
[transformer release];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)transformedValue:(id)value {
|
||||||
|
NSUInteger length = 0;
|
||||||
|
if([value isKindOfClass:[NSString class]]) {
|
||||||
|
length = [value length];
|
||||||
|
}
|
||||||
|
return (length > 0) ? @"12345678" : @"";
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#import "MPUppercaseStringValueTransformer.h"
|
#import "MPUppercaseStringValueTransformer.h"
|
||||||
|
|
||||||
NSString *const MPUppsercaseStringValueTransformerName = @"StringToUppercaseStringTransformer";
|
NSString *const MPUppsercaseStringValueTransformerName = @"com.hicknhack.macpass.StringToUppercaseStringTransformer";
|
||||||
|
|
||||||
@implementation MPUppercaseStringValueTransformer
|
@implementation MPUppercaseStringValueTransformer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user