Improvements to UI cleanup, confirm new master passwords, texts updates.
[FIXED] Immediately open the application on the password entry view if the key is forgotten instead of revealing the internals in a blink. [FIXED] Clean up the UI better when switching between master passwords. [ADDED] Ask spelling confirmation when a master password is used that doesn't have any known sites yet. [ADDED] iPad HD quality icon. [IMPROVED] Artworks re-generated, downscale improved, convertImages improved. [IMPROVED] Small guide text improvements. [UPDATED] Help texts updated for current operation and UI.
This commit is contained in:
@@ -62,11 +62,16 @@
|
||||
|
||||
if (!self.key)
|
||||
// Ask the user to set the key through his master password.
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if ([NSThread isMainThread])
|
||||
[self.navigationController presentViewController:
|
||||
[self.navigationController.storyboard instantiateViewControllerWithIdentifier:@"MPUnlockViewController"]
|
||||
animated:animated completion:nil];
|
||||
});
|
||||
else
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.navigationController presentViewController:
|
||||
[self.navigationController.storyboard instantiateViewControllerWithIdentifier:@"MPUnlockViewController"]
|
||||
animated:animated completion:nil];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)export {
|
||||
@@ -206,7 +211,7 @@
|
||||
[UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f], UITextAttributeTextColor,
|
||||
[UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.8f], UITextAttributeTextShadowColor,
|
||||
[NSValue valueWithUIOffset:UIOffsetMake(0, -1)], UITextAttributeTextShadowOffset,
|
||||
[UIFont fontWithName:@"Helvetica-Neue" size:0.0f], UITextAttributeFont,
|
||||
[UIFont fontWithName:@"Exo-Bold" size:20.0f], UITextAttributeFont,
|
||||
nil]];
|
||||
|
||||
UIImage *navBarButton = [[UIImage imageNamed:@"ui_navbar_button"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];
|
||||
@@ -380,8 +385,10 @@
|
||||
|
||||
[self saveContext];
|
||||
|
||||
if (![[MPiOSConfig get].rememberKey boolValue])
|
||||
if (![[MPiOSConfig get].rememberKey boolValue]) {
|
||||
[self updateKey:nil];
|
||||
[self loadKey:NO];
|
||||
}
|
||||
|
||||
[TestFlight passCheckpoint:MPTestFlightCheckpointDeactivated];
|
||||
}
|
||||
|
@@ -74,6 +74,10 @@
|
||||
|
||||
self.searchTipContainer.hidden = NO;
|
||||
|
||||
if (![self.activeElement.keyID isEqualToData:[MPAppDelegate get].keyID])
|
||||
self.activeElement = nil;
|
||||
self.searchDisplayController.searchBar.text = nil;
|
||||
|
||||
if (!self.activeElement.name)
|
||||
[UIView animateWithDuration:animated? 0.2f: 0 animations:^{
|
||||
self.searchTipContainer.alpha = 1;
|
||||
@@ -111,12 +115,6 @@
|
||||
toView:self.searchTipContainer.superview];
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillResignActiveNotification object:nil queue:[NSOperationQueue mainQueue]
|
||||
usingBlock:^(NSNotification *note) {
|
||||
self.activeElement = nil;
|
||||
[self updateWasAnimated:NO];
|
||||
}];
|
||||
|
||||
self.alertBody.text = nil;
|
||||
self.contentTipEditIcon.hidden = YES;
|
||||
|
||||
|
@@ -131,10 +131,9 @@
|
||||
- (void)update {
|
||||
|
||||
assert(self.query);
|
||||
assert([MPAppDelegate get].keyID);
|
||||
|
||||
self.fetchedResultsController.fetchRequest.predicate = [NSPredicate predicateWithFormat:@"(%@ == '' OR name BEGINSWITH[cd] %@) AND keyID == %@",
|
||||
self.query, self.query, [MPAppDelegate get].keyID];
|
||||
self.query, self.query, NilToNull([MPAppDelegate get].keyID)];
|
||||
|
||||
NSError *error;
|
||||
if (![self.fetchedResultsController performFetch:&error])
|
||||
@@ -142,16 +141,14 @@
|
||||
[self.searchDisplayController.searchResultsTableView reloadData];
|
||||
|
||||
NSArray *subviews = self.searchDisplayController.searchBar.superview.subviews;
|
||||
UIView *overlay = [subviews objectAtIndex:[subviews indexOfObject:self.searchDisplayController.searchBar] + 1];
|
||||
if (self.tipView.superview != overlay && overlay != self.searchDisplayController.searchResultsTableView) {
|
||||
NSUInteger overlayIndex = [subviews indexOfObject:self.searchDisplayController.searchBar] + 1;
|
||||
UIView *overlay = [subviews count] > overlayIndex? [subviews objectAtIndex:overlayIndex]: nil;
|
||||
if (overlay == self.searchDisplayController.searchResultsTableView || ![overlay isKindOfClass:[UIControl class]])
|
||||
overlay = nil;
|
||||
if (self.tipView.superview != overlay) {
|
||||
[self.tipView removeFromSuperview];
|
||||
[overlay addSubview:self.tipView];
|
||||
}
|
||||
|
||||
//dbg(@"Superviews of superview:");
|
||||
//[self.searchDisplayController.searchBar.superview printSuperHierarchy];
|
||||
//dbg(@"Subviews of superview:");
|
||||
//[self.searchDisplayController.searchBar.superview printChildHierarchy];
|
||||
}
|
||||
|
||||
// See MP-14, also crashes easily on internal assertions etc..
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#import "MPUnlockViewController.h"
|
||||
#import "MPAppDelegate.h"
|
||||
#import "MPAppDelegate_Key.h"
|
||||
#import "MPAppDelegate_Store.h"
|
||||
#import "MPElementEntity.h"
|
||||
|
||||
typedef enum {
|
||||
MPLockscreenIdle,
|
||||
@@ -174,9 +176,39 @@ typedef enum {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self showMessage:@"Success!" state:MPLockscreenSuccess];
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (long)(NSEC_PER_SEC * 1.5f)), dispatch_get_main_queue(), ^{
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
});
|
||||
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass([MPElementEntity class])];
|
||||
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"keyID == %@", [MPAppDelegate get].keyID];
|
||||
fetchRequest.fetchLimit = 1;
|
||||
BOOL keyIDHasElements = [[[MPAppDelegate managedObjectContext] executeFetchRequest:fetchRequest error:nil] count] > 0;
|
||||
if (keyIDHasElements)
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (long)(NSEC_PER_SEC * 1.5f)), dispatch_get_main_queue(), ^{
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
});
|
||||
else {
|
||||
[PearlAlert showAlertWithTitle:@"New Master Password"
|
||||
message:
|
||||
@"Please confirm the spelling of this new master password."
|
||||
viewStyle:UIAlertViewStyleSecureTextInput
|
||||
tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex) {
|
||||
if (buttonIndex == [alert cancelButtonIndex]) {
|
||||
[[MPAppDelegate get] updateKey:nil];
|
||||
return;
|
||||
}
|
||||
if (![[alert textFieldAtIndex:0].text isEqualToString:textField.text]) {
|
||||
[PearlAlert showAlertWithTitle:@"Incorrect Master Password"
|
||||
message:
|
||||
@"The password you entered doesn't match with the master password you tried to use. "
|
||||
@"You've probably mistyped one of them.\n\n"
|
||||
@"Give it another try."
|
||||
viewStyle:UIAlertViewStyleDefault tappedButtonBlock:nil
|
||||
cancelTitle:[PearlStrings get].commonButtonOkay otherTitles:nil];
|
||||
return;
|
||||
}
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
}
|
||||
cancelTitle:[PearlStrings get].commonButtonCancel
|
||||
otherTitles:[PearlStrings get].commonButtonContinue, nil];
|
||||
}
|
||||
});
|
||||
else
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
@@ -32,8 +32,7 @@
|
||||
<string>Icon.png</string>
|
||||
<string>Icon@2x.png</string>
|
||||
<string>Icon-72.png</string>
|
||||
<string>Default.png</string>
|
||||
<string>Default@2x.png</string>
|
||||
<string>Icon-72@2x.png</string>
|
||||
</array>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
@@ -44,8 +43,7 @@
|
||||
<string>Icon.png</string>
|
||||
<string>Icon@2x.png</string>
|
||||
<string>Icon-72.png</string>
|
||||
<string>Default.png</string>
|
||||
<string>Default@2x.png</string>
|
||||
<string>Icon-72@2x.png</string>
|
||||
</array>
|
||||
<key>UIPrerenderedIcon</key>
|
||||
<true/>
|
||||
|
Reference in New Issue
Block a user