|
@@ -455,7 +455,7 @@ NSPopoverDelegate>
|
|
|
}
|
|
|
} else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type3 ||
|
|
|
[KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type11) {
|
|
|
- self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"开通会员", nil)];
|
|
|
+ self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Renew now", nil)];
|
|
|
} else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type5 ||
|
|
|
[KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type9 ||
|
|
|
[KMMemberInfo shared].userScenarioType == KMUserScenarioTypePro_type1 ||
|
|
@@ -479,11 +479,31 @@ NSPopoverDelegate>
|
|
|
} else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type7
|
|
|
// [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type8 ||
|
|
|
/*[KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type13*/) {
|
|
|
- self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"立即续费", nil)];
|
|
|
+ self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Renew now", nil)];
|
|
|
}
|
|
|
[self.button setTitleColor:[NSColor whiteColor]];
|
|
|
self.bgImg.hidden = NO;
|
|
|
self.button.hidden = NO;
|
|
|
+
|
|
|
+ KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
|
|
|
+ // 单平台高级版永久 未登录时 也不显示升级(因为点了也得先登录),但是登录后的卡片里是有升级按钮的,可以升级成全平台高级版年订阅
|
|
|
+ //原来是订阅的,不需要升级,因为目前不支持订阅升级订阅这种场景
|
|
|
+ if(type == KMUserScenarioTypeLite_type9 ||
|
|
|
+ type == KMUserScenarioTypeLite_type10 ||
|
|
|
+ type == KMUserScenarioTypeLite_type11 ||
|
|
|
+ type == KMUserScenarioTypeLite_type12 ||
|
|
|
+ type == KMUserScenarioTypeLite_type13 ||
|
|
|
+ type == KMUserScenarioTypePro_type1 ||
|
|
|
+ type == KMUserScenarioTypePro_type2 ||
|
|
|
+ type == KMUserScenarioTypePro_type3 ||
|
|
|
+ type == KMUserScenarioTypePro_type4 ||
|
|
|
+ type == KMUserScenarioTypePro_type5) {
|
|
|
+ if ([KMMemberInfo shared].isLogin == NO || ([KMMemberInfo shared].isMemberAllFunction == NO && [KMMemberInfo shared].isLogin == YES)) {
|
|
|
+ self.button.hidden = YES;
|
|
|
+ self.bgImg.hidden = YES;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
self.button.frame = CGRectMake(totalWidth, kbottomGap, buttonWidth, self.view.frame.size.height -2 *kbottomGap);
|
|
|
CGRect rect = self.button.frame;
|
|
|
self.bgImg.frame = rect;
|
|
@@ -540,135 +560,6 @@ NSPopoverDelegate>
|
|
|
}
|
|
|
|
|
|
- (IBAction)buttonAction:(id)sender {
|
|
|
-// BOOL isFree = NO;
|
|
|
-//
|
|
|
-//#if VERSION_DMG
|
|
|
-// if (ActivityStatusNone == [VerificationManager manager].status) {
|
|
|
-// //弹出 试用弹窗UI优化-新用户试用路径 新UI 情况一 右上角按钮
|
|
|
-// KMPurchaseFirstTrialWindowController *firstTrialWC = [KMPurchaseFirstTrialWindowController currentFirstTrialWC];
|
|
|
-// firstTrialWC.buttonActionBlock = ^(KMPurchaseFirstTrialWindowController * _Nonnull ftWC, KMButton * _Nonnull btn, NSString * _Nonnull email, NSString * _Nonnull name) {
|
|
|
-// if (btn.tag == 10001) {
|
|
|
-// if (ActivityStatusNone == [VerificationManager manager].status ||
|
|
|
-// ActivityStatusTrialExpire == [VerificationManager manager].status) {
|
|
|
-//
|
|
|
-// [[FMTrackEventManager defaultManager] trackEventWithEvent:@"Tbr" withProperties:@{@"Tbr_Btn":@"Btn_Tbr_SecondTrial"}];
|
|
|
-// [[VerificationManager manager] trialForDays:7
|
|
|
-// email:email?:[VerificationManager manager].email
|
|
|
-// name:name?:[VerificationManager manager].accountName
|
|
|
-// complention:^(ActivityStatus status, NSDictionary *info, NSError *error) {
|
|
|
-// if (error ||
|
|
|
-// status != ActivityStatusTrial) {
|
|
|
-// NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Activation Error", nil)
|
|
|
-// defaultButton:NSLocalizedString(@"Try Again", nil)
|
|
|
-// alternateButton:nil
|
|
|
-// otherButton:nil
|
|
|
-// informativeTextWithFormat:NSLocalizedString(@"Failed to sign up for the free trial. Please make sure your internet connection is available and try again later.", nil), nil];
|
|
|
-// [alert runModal];
|
|
|
-// } else {
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeRepeatTrialSuccess];
|
|
|
-// [vc showWindow:nil];
|
|
|
-// }
|
|
|
-// }];
|
|
|
-// [ftWC close];
|
|
|
-// } else {
|
|
|
-// [ftWC close];
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
|
|
|
-// vc.callback = ^{
|
|
|
-// [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
|
|
|
-// };
|
|
|
-// [vc showWindow:nil];
|
|
|
-// }
|
|
|
-// } else if (btn.tag == 10002) {
|
|
|
-// NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?utm_source=app_dmg&utm_medium=dmg_puw_free_trial", Swift_oc_Tool.Store_Link_OC]];
|
|
|
-// [[NSWorkspace sharedWorkspace] openURL:url];
|
|
|
-// [[FMTrackEventManager defaultManager] trackEventWithEvent:@"PUW" withProperties:@{@"PUW_Btn":@"PUW_Btn_UpgradeBuyNow"}];
|
|
|
-// } else if (btn.tag == 10003) {
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];//KMVerificationTypeActivate
|
|
|
-// [vc showWindow:nil];
|
|
|
-// [ftWC close];
|
|
|
-// }
|
|
|
-// };
|
|
|
-// [firstTrialWC.window center];
|
|
|
-// [firstTrialWC showWindow:nil];
|
|
|
-// } else if (ActivityStatusTrialExpire == [VerificationManager manager].status ||
|
|
|
-// ActivityStatusTrial == [VerificationManager manager].status) {
|
|
|
-// [[NSNotificationCenter defaultCenter] postNotificationName:@"KMVerificationMessagePopShowNoti" object:nil];
|
|
|
-//
|
|
|
-// if (!self.testVC) {
|
|
|
-// self.testVC = [[KMUnlockAlertViewController alloc] init];
|
|
|
-// }
|
|
|
-// [self.testVC addtrackingAreaInfo];
|
|
|
-// self.testVC.callback = ^(NSInteger index) {
|
|
|
-// if (index == 1) {
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
|
|
|
-// [vc showWindow:nil];
|
|
|
-// } else if (index == 2) {
|
|
|
-// KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_3"];
|
|
|
-// [embeddedWC showWindow:nil];
|
|
|
-// [[embeddedWC window] center];
|
|
|
-// }
|
|
|
-// };
|
|
|
-// self.testVC.mouseEventCall = ^(BOOL mouseEnter) {
|
|
|
-// if (mouseEnter) {
|
|
|
-// self.stopPopOverHide = YES;
|
|
|
-// if (ActivityStatusTrialExpire == [VerificationManager manager].status ||
|
|
|
-// ActivityStatusTrial == [VerificationManager manager].status) {
|
|
|
-// if (!self.popover.isShown) {
|
|
|
-// [self buttonAction:self.button];
|
|
|
-// }
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// self.stopPopOverHide = NO;
|
|
|
-// if (self.popover) {
|
|
|
-// [self.popover close];
|
|
|
-// }
|
|
|
-// [self.testVC removeTrackingAreaInfo];
|
|
|
-// }
|
|
|
-// };
|
|
|
-// NSPopover *popover = [[NSPopover alloc] init];
|
|
|
-// popover.delegate = self;
|
|
|
-// popover.contentViewController = self.testVC;
|
|
|
-// popover.animates = YES;
|
|
|
-// popover.behavior = NSPopoverBehaviorTransient;
|
|
|
-// [popover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMinYEdge];
|
|
|
-// self.popover = popover;
|
|
|
-// } else if (ActivityStatusVerifExpire == [VerificationManager manager].status) {
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivateExpired];
|
|
|
-// [vc showWindow:nil];
|
|
|
-// } else if (ActivityStatusVerification == [VerificationManager manager].status) {
|
|
|
-// if ([VerificationManager manager].needUpgradeLicense) {
|
|
|
-// KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
|
|
|
-// [embeddedWC showWindow:nil];
|
|
|
-// [[embeddedWC window] center];
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// if ([VerificationManager manager].needUpgradeLicense) {
|
|
|
-// KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
|
|
|
-// [embeddedWC showWindow:nil];
|
|
|
-// [[embeddedWC window] center];
|
|
|
-// } else {
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeNormal];
|
|
|
-// [vc showWindow:nil];
|
|
|
-// }
|
|
|
-// }
|
|
|
-//#else
|
|
|
-// isFree = YES;
|
|
|
-//#if VERSION_FREE
|
|
|
-// if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
|
|
|
-// isFree = NO;
|
|
|
-// }
|
|
|
-// if (isFree) {
|
|
|
-// [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
|
|
|
-// }
|
|
|
-//#else
|
|
|
-// if (![IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice) {
|
|
|
-// KMToolCompareWindowController *vc = [KMToolCompareWindowController toolCompareWithToolType:KMCompareWithToolTypeConvert selectNum:0];
|
|
|
-// [vc.window center];
|
|
|
-// [vc showWindow:nil];
|
|
|
-// }
|
|
|
-//#endif
|
|
|
-//
|
|
|
-//#endif
|
|
|
if ([KMMemberInfo shared].isLogin) {
|
|
|
[[KMProductCompareWC shared] setOrientation:YES];
|
|
|
if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type1) {
|