From 6d25463de073a349a66a8eabe35bcb7c173c3889 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Tue, 21 Jul 2020 21:21:52 -0400 Subject: [PATCH] Rename next-gen to Spectre. --- .../Source/iOS/MPSitesViewController.h | 6 +++--- .../Source/iOS/MPSitesViewController.m | 20 +++++++++---------- platform-darwin/Source/iOS/MPiOSAppDelegate.h | 2 +- platform-darwin/Source/iOS/MPiOSAppDelegate.m | 20 +++++++++---------- .../Source/iOS/MasterPassword-Info.plist | 2 +- .../Source/iOS/Storyboard.storyboard | 14 ++++++------- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/platform-darwin/Source/iOS/MPSitesViewController.h b/platform-darwin/Source/iOS/MPSitesViewController.h index e770101b..109a54ea 100644 --- a/platform-darwin/Source/iOS/MPSitesViewController.h +++ b/platform-darwin/Source/iOS/MPSitesViewController.h @@ -30,8 +30,8 @@ @property(nonatomic, strong) IBOutlet UIView *badNameTipContainer; @property(nonatomic, strong) IBOutlet UIView *popdownView; @property(nonatomic, strong) IBOutlet UIView *popdownContainer; -@property(nonatomic, strong) IBOutlet UIView *voltoInstallAlert; -@property(nonatomic, strong) IBOutlet UIView *voltoMigrateAlert; +@property(nonatomic, strong) IBOutlet UIView *spectreInstallAlert; +@property(nonatomic, strong) IBOutlet UIView *spectreMigrateAlert; @property(assign, nonatomic) BOOL active; @@ -39,6 +39,6 @@ - (void)reloadSites; - (IBAction)dismissPopdown:(id)sender; -- (IBAction)upgradeVolto:(UIButton *)sender; +- (IBAction)upgradeSpectre:(UIButton *)sender; @end diff --git a/platform-darwin/Source/iOS/MPSitesViewController.m b/platform-darwin/Source/iOS/MPSitesViewController.m index 06bf6fbb..e73ae203 100644 --- a/platform-darwin/Source/iOS/MPSitesViewController.m +++ b/platform-darwin/Source/iOS/MPSitesViewController.m @@ -72,7 +72,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) { [self registerObservers]; [self updateConfigKey:nil]; - [self updateVoltoAlerts]; + [self updateSpectreAlerts]; static NSRegularExpression *bareHostRE = nil; static dispatch_once_t once = 0; @@ -320,7 +320,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) { PearlAddNotificationObserver( UIApplicationWillEnterForegroundNotification, nil, [NSOperationQueue mainQueue], ^(MPSitesViewController *self, NSNotification *note) { [self viewWillAppear:YES]; - [self updateVoltoAlerts]; + [self updateSpectreAlerts]; } ); PearlAddNotificationObserver( MPSignedOutNotification, nil, nil, ^(MPSitesViewController *self, NSNotification *note) { @@ -457,23 +457,23 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) { self.popdownToTopConstraint.priority = UILayoutPriorityDefaultHigh; } -- (IBAction)upgradeVolto:(UIButton *)sender { +- (IBAction)upgradeSpectre:(UIButton *)sender { [[MPiOSAppDelegate get] migrateFor:[MPiOSAppDelegate get].activeUserForMainThread]; } #pragma mark - Private -- (void)updateVoltoAlerts { +- (void)updateSpectreAlerts { - BOOL voltoInstalled = [UIApp canOpenURL:[[NSURL alloc] initWithString:@"volto:"]]; - if (voltoInstalled) { - self.voltoInstallAlert.visible = NO; - self.voltoMigrateAlert.visible = YES; + BOOL spectreInstalled = [UIApp canOpenURL:[[NSURL alloc] initWithString:@"spectre:"]]; + if (spectreInstalled) { + self.spectreInstallAlert.visible = NO; + self.spectreMigrateAlert.visible = YES; } else { - self.voltoInstallAlert.visible = [MPiOSAppDelegate get].voltoViewController != nil; - self.voltoMigrateAlert.visible = NO; + self.spectreInstallAlert.visible = [MPiOSAppDelegate get].spectreViewController != nil; + self.spectreMigrateAlert.visible = NO; } } diff --git a/platform-darwin/Source/iOS/MPiOSAppDelegate.h b/platform-darwin/Source/iOS/MPiOSAppDelegate.h index c77fc5e9..bcddbca2 100644 --- a/platform-darwin/Source/iOS/MPiOSAppDelegate.h +++ b/platform-darwin/Source/iOS/MPiOSAppDelegate.h @@ -24,7 +24,7 @@ @interface MPiOSAppDelegate : MPAppDelegate_Shared @property(nonatomic, strong) UIWindow *window; -@property(nonatomic, strong) SKStoreProductViewController *voltoViewController; +@property(nonatomic, strong) SKStoreProductViewController *spectreViewController; - (void)openURL:(NSURL *)url; diff --git a/platform-darwin/Source/iOS/MPiOSAppDelegate.m b/platform-darwin/Source/iOS/MPiOSAppDelegate.m index 2a6c14e7..d8b0cef5 100644 --- a/platform-darwin/Source/iOS/MPiOSAppDelegate.m +++ b/platform-darwin/Source/iOS/MPiOSAppDelegate.m @@ -187,16 +187,16 @@ SKStoreProductParameterCampaignToken : @"app-masterpassword.ios", /* Campaign: From MasterPassword iOS */ SKStoreProductParameterProviderToken : @153897, /* Provider: Maarten Billemont */ // SKStoreProductParameterITunesItemIdentifier: @510296984, /* Application: MasterPassword iOS */ - SKStoreProductParameterITunesItemIdentifier: @1500430196, /* Application: Volto iOS */ + SKStoreProductParameterITunesItemIdentifier: @1500430196, /* Application: Spectre iOS */ } completionBlock:^(BOOL result, NSError *error) { if (error) - err( @"Failed loading Volto product information: %@", error ); + err( @"Failed loading Spectre product information: %@", error ); if (result) { - self.voltoViewController = migrateVC; - self.voltoViewController.delegate = self; + self.spectreViewController = migrateVC; + self.spectreViewController.delegate = self; } else { - self.voltoViewController = nil; + self.spectreViewController = nil; } }]; @@ -705,7 +705,7 @@ - (void)migrateFor:(MPUserEntity *)user { - if ([UIApp canOpenURL:[[NSURL alloc] initWithString:@"volto:"]]) { + if ([UIApp canOpenURL:[[NSURL alloc] initWithString:@"spectre:"]]) { if (!user) { [MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) { NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass( [MPUserEntity class] )]; @@ -714,7 +714,7 @@ return; UIAlertController *usersSheet = [UIAlertController alertControllerWithTitle:@"Migrate User" - message:@"Choose a user to migrate out to Volto." + message:@"Choose a user to migrate out to Spectre." preferredStyle:UIAlertControllerStyleAlert]; [usersSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; for (MPUserEntity *user_ in users) @@ -762,7 +762,7 @@ return; NSURLComponents *components = [NSURLComponents new]; - components.scheme = @"volto"; + components.scheme = @"spectre"; components.path = @"import"; components.queryItems = @[ [[NSURLQueryItem alloc] initWithName:@"data" value:exportedUser] ]; [UIApp openURL:components.URL]; @@ -770,8 +770,8 @@ }]; } - else if (self.voltoViewController) - [self.window.rootViewController presentViewController:self.voltoViewController animated:YES completion:nil]; + else if (self.spectreViewController) + [self.window.rootViewController presentViewController:self.spectreViewController animated:YES completion:nil]; } - (void)changeMasterPasswordFor:(MPUserEntity *)user saveInContext:(NSManagedObjectContext *)moc didResetBlock:(void ( ^ )(void))didReset { diff --git a/platform-darwin/Source/iOS/MasterPassword-Info.plist b/platform-darwin/Source/iOS/MasterPassword-Info.plist index 50032417..2672ec27 100644 --- a/platform-darwin/Source/iOS/MasterPassword-Info.plist +++ b/platform-darwin/Source/iOS/MasterPassword-Info.plist @@ -60,7 +60,7 @@ firefox googlechrome opera-http - volto + spectre LSRequiresIPhoneOS diff --git a/platform-darwin/Source/iOS/Storyboard.storyboard b/platform-darwin/Source/iOS/Storyboard.storyboard index 8569a294..25ea7f51 100644 --- a/platform-darwin/Source/iOS/Storyboard.storyboard +++ b/platform-darwin/Source/iOS/Storyboard.storyboard @@ -1679,12 +1679,12 @@ eg. apple.com, rmitchell@twitter.com - +