Files
comaps/iphone/Maps/Classes/CustomAlert/MWMOsmAuthAlert.mm
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

57 lines
1.3 KiB
Plaintext

#import "MWMAlertViewController.h"
#import "MWMOsmAuthAlert.h"
#include "editor/osm_auth.hpp"
static NSString * const kMap2OsmLoginSegue = @"Map2OsmLogin";
extern NSString * const kMap2FBLoginSegue;
extern NSString * const kMap2GoogleLoginSegue;
@implementation MWMOsmAuthAlert
+ (instancetype)alert
{
MWMOsmAuthAlert * alert =
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
return alert;
}
- (IBAction)facebookTap
{
[self close:^{
[self.alertController.ownerViewController performSegueWithIdentifier:kMap2FBLoginSegue
sender:nil];
}];
}
- (IBAction)googleTap
{
[self close:^{
[self.alertController.ownerViewController performSegueWithIdentifier:kMap2GoogleLoginSegue
sender:nil];
}];
}
- (IBAction)osmTap
{
[self close:^{
[self.alertController.ownerViewController performSegueWithIdentifier:kMap2OsmLoginSegue
sender:nil];
}];
}
- (IBAction)signUpTap
{
[self close:^{
[self.alertController.ownerViewController openUrl:@(osm::OsmOAuth::ServerAuth().GetRegistrationURL().c_str())];
}];
}
- (IBAction)closeTap
{
[self close:nil];
}
@end