forked from organicmaps/organicmaps
[ads][ios] additional ads into download on map dialog are added
This commit is contained in:
parent
50fb05bb7f
commit
bb482f60d5
11 changed files with 108 additions and 8 deletions
|
@ -12,6 +12,11 @@ typedef NS_ENUM(NSInteger, MWMBannerType) {
|
|||
MWMBannerTypeBookmarkCatalog,
|
||||
MWMBannerTypeMastercardSberbank,
|
||||
MWMBannerTypeCitymobil,
|
||||
MWMBannerTypeArsenalMedic,
|
||||
MWMBannerTypeArsenalFlat,
|
||||
MWMBannerTypeArsenalInsuranceCrimea,
|
||||
MWMBannerTypeArsenalInsuranceRussia,
|
||||
MWMBannerTypeArsenalInsuranceWorld,
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
|
|
@ -24,6 +24,16 @@ static MWMBannerType ConvertBannerType(ads::Banner::Type coreType) {
|
|||
return MWMBannerTypeMastercardSberbank;
|
||||
case ads::Banner::Type::Citymobil:
|
||||
return MWMBannerTypeCitymobil;
|
||||
case ads::Banner::Type::ArsenalMedic:
|
||||
return MWMBannerTypeArsenalMedic;
|
||||
case ads::Banner::Type::ArsenalFlat:
|
||||
return MWMBannerTypeArsenalFlat;
|
||||
case ads::Banner::Type::ArsenalInsuranceCrimea:
|
||||
return MWMBannerTypeArsenalInsuranceCrimea;
|
||||
case ads::Banner::Type::ArsenalInsuranceRussia:
|
||||
return MWMBannerTypeArsenalInsuranceRussia;
|
||||
case ads::Banner::Type::ArsenalInsuranceWorld:
|
||||
return MWMBannerTypeArsenalInsuranceWorld;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,36 @@ extension PartnerBannerViewModel {
|
|||
button: L("sberbank_map_downloader_cta_button"),
|
||||
style: "Sberbank",
|
||||
type: .multiple)
|
||||
case .arsenalMedic:
|
||||
self.init(images: ["ic_logo_arsenal"],
|
||||
message: L("arsenal_telemed_map_downloader_title"),
|
||||
button: L("arsenal_cta_button"),
|
||||
style: "Arsenal",
|
||||
type: .single)
|
||||
case . arsenalFlat:
|
||||
self.init(images: ["ic_logo_arsenal"],
|
||||
message: L("arsenal_flat_map_downloader_title"),
|
||||
button: L("arsenal_cta_button"),
|
||||
style: "Arsenal",
|
||||
type: .single)
|
||||
case . arsenalInsuranceCrimea:
|
||||
self.init(images: ["ic_logo_arsenal"],
|
||||
message: L("arsenal_crimea_map_downloader_title"),
|
||||
button: L("arsenal_cta_button"),
|
||||
style: "Arsenal",
|
||||
type: .single)
|
||||
case . arsenalInsuranceRussia:
|
||||
self.init(images: ["ic_logo_arsenal"],
|
||||
message: L("arsenal_russia_map_downloader_title"),
|
||||
button: L("arsenal_cta_button"),
|
||||
style: "Arsenal",
|
||||
type: .single)
|
||||
case . arsenalInsuranceWorld:
|
||||
self.init(images: ["ic_logo_arsenal"],
|
||||
message: L("arsenal_abroad_map_downloader_title"),
|
||||
button: L("arsenal_cta_button"),
|
||||
style: "Arsenal",
|
||||
type: .single)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -280,8 +280,12 @@ using namespace storage;
|
|||
case MWMBannerTypeMts: return kStatMts;
|
||||
case MWMBannerTypeSkyeng: return kStatSkyeng;
|
||||
case MWMBannerTypeBookmarkCatalog: return kStatMapsmeGuides;
|
||||
case MWMBannerTypeMastercardSberbank:
|
||||
return kStatMastercardSberbank;
|
||||
case MWMBannerTypeMastercardSberbank: return kStatMastercardSberbank;
|
||||
case MWMBannerTypeArsenalMedic: return kStatArsenalMedic;
|
||||
case MWMBannerTypeArsenalFlat: return kStatArsenalFlat;
|
||||
case MWMBannerTypeArsenalInsuranceCrimea: return kStatArsenalInsuranceCrimea;
|
||||
case MWMBannerTypeArsenalInsuranceRussia: return kStatArsenalInsuranceRussia;
|
||||
case MWMBannerTypeArsenalInsuranceWorld: return kStatArsenalInsuranceWorld;
|
||||
default: return @("");
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +301,12 @@ using namespace storage;
|
|||
case MWMBannerTypeTinkoffInsurance:
|
||||
case MWMBannerTypeMts:
|
||||
case MWMBannerTypeSkyeng:
|
||||
case MWMBannerTypeMastercardSberbank: {
|
||||
case MWMBannerTypeMastercardSberbank:
|
||||
case MWMBannerTypeArsenalMedic:
|
||||
case MWMBannerTypeArsenalFlat:
|
||||
case MWMBannerTypeArsenalInsuranceCrimea:
|
||||
case MWMBannerTypeArsenalInsuranceRussia:
|
||||
case MWMBannerTypeArsenalInsuranceWorld: {
|
||||
__weak __typeof(self) ws = self;
|
||||
MWMVoidBlock onClick = ^{
|
||||
[ws bannerAction];
|
||||
|
|
|
@ -309,6 +309,11 @@ static NSString *const kStatTurnOn = @"turn_on";
|
|||
static NSString *const kStatMts = @"MTS";
|
||||
static NSString *const kStatSkyeng = @"Skyeng";
|
||||
static NSString *const kStatMastercardSberbank = @"MastercardSberbank";
|
||||
static NSString *const kStatArsenalMedic = @"Arsenal_telemed";
|
||||
static NSString *const kStatArsenalFlat = @"Arsenal_flat";
|
||||
static NSString *const kStatArsenalInsuranceCrimea = @"Arsenal_crimea";
|
||||
static NSString *const kStatArsenalInsuranceRussia = @"Arsenal_russia";
|
||||
static NSString *const kStatArsenalInsuranceWorld = @"Arsenal_abroad";
|
||||
static NSString *const kStatSubway = @"subway";
|
||||
static NSString *const kStatMenu = @"menu";
|
||||
static NSString *const kStatMethod = @"method";
|
||||
|
|
|
@ -19,9 +19,13 @@ static inline MWMBannerType MatchBannerType(ads::Banner::Type coreType)
|
|||
case ads::Banner::Type::Mts: return MWMBannerTypeMts;
|
||||
case ads::Banner::Type::Skyeng: return MWMBannerTypeSkyeng;
|
||||
case ads::Banner::Type::BookmarkCatalog: return MWMBannerTypeBookmarkCatalog;
|
||||
case ads::Banner::Type::MastercardSberbank:
|
||||
return MWMBannerTypeMastercardSberbank;
|
||||
case ads::Banner::Type::MastercardSberbank: return MWMBannerTypeMastercardSberbank;
|
||||
case ads::Banner::Type::Citymobil: return MWMBannerTypeCitymobil;
|
||||
case ads::Banner::Type::ArsenalMedic: return MWMBannerTypeArsenalMedic;
|
||||
case ads::Banner::Type::ArsenalFlat: return MWMBannerTypeArsenalFlat;
|
||||
case ads::Banner::Type::ArsenalInsuranceCrimea: return MWMBannerTypeArsenalInsuranceCrimea;
|
||||
case ads::Banner::Type::ArsenalInsuranceRussia: return MWMBannerTypeArsenalInsuranceRussia;
|
||||
case ads::Banner::Type::ArsenalInsuranceWorld: return MWMBannerTypeArsenalInsuranceWorld;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,14 @@ class PartnersStyleSheet: IStyleSheet {
|
|||
s.cornerRadius = 14
|
||||
s.clip = true
|
||||
}
|
||||
|
||||
theme.add(styleName: "Arsenal") { (s) -> (Void) in
|
||||
s.backgroundColor = UIColor(fromHexString: "93C950")
|
||||
s.fontColor = .white
|
||||
s.font = fonts.semibold14
|
||||
s.cornerRadius = 14
|
||||
s.clip = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
21
iphone/Maps/Images.xcassets/PartnersBanner/ic_logo_arsenal.imageset/Contents.json
vendored
Normal file
21
iphone/Maps/Images.xcassets/PartnersBanner/ic_logo_arsenal.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "ic_logo_arsenal.pdf",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/PartnersBanner/ic_logo_arsenal.imageset/ic_logo_arsenal.pdf
vendored
Normal file
BIN
iphone/Maps/Images.xcassets/PartnersBanner/ic_logo_arsenal.imageset/ic_logo_arsenal.pdf
vendored
Normal file
Binary file not shown.
|
@ -42,6 +42,8 @@
|
|||
3D8DAE7525026B550000513A /* yango_api.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D8DAE7325026B540000513A /* yango_api.hpp */; };
|
||||
3D8DAE7625026B550000513A /* yango_api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D8DAE7425026B550000513A /* yango_api.cpp */; };
|
||||
3DA5713420B57358007BDE27 /* booking_params_base.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5713320B57358007BDE27 /* booking_params_base.hpp */; };
|
||||
3DA5876C25506123002E024C /* arsenal_ads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5876A25506123002E024C /* arsenal_ads.cpp */; };
|
||||
3DA5876D25506123002E024C /* arsenal_ads.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5876B25506123002E024C /* arsenal_ads.hpp */; };
|
||||
3DA6BCDF2535B52E00DF0DA5 /* citymobil_api.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA6BCDD2535B52E00DF0DA5 /* citymobil_api.hpp */; };
|
||||
3DA6BCE02535B52E00DF0DA5 /* citymobil_api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA6BCDE2535B52E00DF0DA5 /* citymobil_api.cpp */; };
|
||||
3DA6BCE22535B53C00DF0DA5 /* citymobil_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA6BCE12535B53C00DF0DA5 /* citymobil_tests.cpp */; };
|
||||
|
@ -170,6 +172,8 @@
|
|||
3D8DAE7325026B540000513A /* yango_api.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = yango_api.hpp; sourceTree = "<group>"; };
|
||||
3D8DAE7425026B550000513A /* yango_api.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = yango_api.cpp; sourceTree = "<group>"; };
|
||||
3DA5713320B57358007BDE27 /* booking_params_base.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_params_base.hpp; sourceTree = "<group>"; };
|
||||
3DA5876A25506123002E024C /* arsenal_ads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = arsenal_ads.cpp; sourceTree = "<group>"; };
|
||||
3DA5876B25506123002E024C /* arsenal_ads.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = arsenal_ads.hpp; sourceTree = "<group>"; };
|
||||
3DA6BCDD2535B52E00DF0DA5 /* citymobil_api.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = citymobil_api.hpp; sourceTree = "<group>"; };
|
||||
3DA6BCDE2535B52E00DF0DA5 /* citymobil_api.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = citymobil_api.cpp; sourceTree = "<group>"; };
|
||||
3DA6BCE12535B53C00DF0DA5 /* citymobil_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = citymobil_tests.cpp; sourceTree = "<group>"; };
|
||||
|
@ -302,6 +306,8 @@
|
|||
3DBD7BE524251BF000ED9FE8 /* ads */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3DA5876A25506123002E024C /* arsenal_ads.cpp */,
|
||||
3DA5876B25506123002E024C /* arsenal_ads.hpp */,
|
||||
3DA6BCE32538B3B500DF0DA5 /* citymobil_ads.cpp */,
|
||||
3DA6BCE42538B3B500DF0DA5 /* citymobil_ads.hpp */,
|
||||
3DCF64A724DC0A0200C49963 /* mastercard_sber_ads.cpp */,
|
||||
|
@ -498,6 +504,7 @@
|
|||
3D1775A82318198700F8889C /* promo_catalog_types.hpp in Headers */,
|
||||
3DBD7C1524251BF000ED9FE8 /* bookmark_catalog_ads.hpp in Headers */,
|
||||
3DCD415420DAB33700143533 /* booking_block_params.hpp in Headers */,
|
||||
3DA5876D25506123002E024C /* arsenal_ads.hpp in Headers */,
|
||||
F67E75261DB8F06F00D6741F /* opentable_api.hpp in Headers */,
|
||||
F6B536411DA520E40067EEA5 /* booking_api.hpp in Headers */,
|
||||
3DBD7C1124251BF000ED9FE8 /* skyeng_ads.hpp in Headers */,
|
||||
|
@ -645,6 +652,7 @@
|
|||
3D4E997F1FB439300025B48C /* utils.cpp in Sources */,
|
||||
3D15ACE8214AA1B000F725D5 /* rutaxi_api.cpp in Sources */,
|
||||
3DBD7B9824112DE100ED9FE8 /* freenow_api.cpp in Sources */,
|
||||
3DA5876C25506123002E024C /* arsenal_ads.cpp in Sources */,
|
||||
3DBD7C0C24251BF000ED9FE8 /* tinkoff_allairlines_ads.cpp in Sources */,
|
||||
45C380772094C5B400C18D81 /* partners.cpp in Sources */,
|
||||
3DBD7C1E24251C1100ED9FE8 /* tinkoff_insurance_tests.cpp in Sources */,
|
||||
|
|
Loading…
Add table
Reference in a new issue