소스 검색

Merge branch 'develop_PDFReaderPro_V4.7.0' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderPro_V4.7.0

wangshuai 5 일 전
부모
커밋
6a4faaff31

+ 42 - 5
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -178,7 +178,7 @@ NSPopoverDelegate>
     self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade to Pro", nil)];
     [self.button setTitleColor:[NSColor whiteColor]];
     self.officeButton.layer.backgroundColor = [NSColor clearColor].CGColor;
-    self.officeButton.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"PDF To Office", nil)];
+    self.officeButton.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"PDF to Office", nil)];
     [self.officeButton setTitleColor:[NSColor whiteColor]];
 
     self.aiLabel.stringValue = NSLocalizedStringFromTable(@"Free Use 1-Year AI Tools", @"MemberCenterLocalizable", nil);
@@ -351,18 +351,31 @@ NSPopoverDelegate>
             }
         } else if (type == KMUserScenarioTypeLite_type11) {
             self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade", nil)];
+        } else if (type == KMUserScenarioTypePro_type3) {
+            if([KMMemberInfo shared].vip_status == 2) {
+                self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedStringFromTable(@"Renew now",@"MemberCenterLocalizable", nil)];
+            } else {
+                self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade", nil)];
+            }
         }
 #if !VERSION_FREE
-//        VerificationManager.default().needUpgradeLicense
-        if ([[VerificationManager defaultManager] needUpgradeLicense]) {
+        BOOL isNoSupportMemberUpgrade = YES;
+         if ([KMMemberInfo shared].vip_status == 1) { //订阅+永久
+             isNoSupportMemberUpgrade = NO;
+        }
+        
+        if (![IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice && isNoSupportMemberUpgrade) {
             [self.officeButton setTitleColor:[NSColor whiteColor]];
-            self.officeButton.hidden = YES;
-            self.officeImg.hidden = YES;
+            self.officeButton.hidden = NO;
+            self.officeImg.hidden = NO;
             self.officeButton.frame = CGRectMake(totalWidth, kbottomGap, officeWidth, self.view.frame.size.height -2 *kbottomGap);
             CGRect officeRect = self.officeButton.frame;
             self.officeImg.frame = officeRect;
             totalWidth+=CGRectGetWidth(self.officeButton.bounds);
             totalWidth+=4;
+        } else {
+            self.officeButton.hidden = YES;
+            self.officeImg.hidden = YES;
         }
 #else
         self.officeButton.hidden = YES;
@@ -437,6 +450,30 @@ NSPopoverDelegate>
                type == KMUserScenarioTypePro_type5) {
         self.button.hidden = YES;
         self.bgImg.hidden = YES;
+        
+#if !VERSION_FREE
+        BOOL isNoSupportMemberUpgrade = YES;
+         if ([KMMemberInfo shared].vip_status == 1) { //订阅+永久
+             isNoSupportMemberUpgrade = NO;
+        }
+        
+        if (![IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice && isNoSupportMemberUpgrade) {
+            [self.officeButton setTitleColor:[NSColor whiteColor]];
+            self.officeButton.hidden = NO;
+            self.officeImg.hidden = NO;
+            self.officeButton.frame = CGRectMake(totalWidth, kbottomGap, officeWidth, self.view.frame.size.height -2 *kbottomGap);
+            CGRect officeRect = self.officeButton.frame;
+            self.officeImg.frame = officeRect;
+            totalWidth+=CGRectGetWidth(self.officeButton.bounds);
+            totalWidth+=4;
+        } else {
+            self.officeButton.hidden = YES;
+            self.officeImg.hidden = YES;
+        }
+#else
+        self.officeButton.hidden = YES;
+        self.officeImg.hidden = YES;
+#endif
     }
 #endif
     

+ 4 - 0
PDF Office/PDF Master/MemberCenter/Assets/en.lproj/MemberCenterLocalizable.strings

@@ -113,3 +113,7 @@
 "Free Use 1-Year AI Tools" = "Free Use 1-Year AI Tools";
 
 "Password cannot exceed 30 characters." = "Password cannot exceed 30 characters.";
+
+"1-Year AI Tools Giveaway" = "1-Year AI Tools Giveaway";
+"Free for the first year, then automatically renew at $125.99 annually. You can cancel your subscription anytime." = "Free for the first year, then automatically renew at $125.99 annually. You can cancel your subscription anytime.";
+"Service Agreement" = "Service Agreement";

+ 4 - 0
PDF Office/PDF Master/MemberCenter/Assets/zh-Hans.lproj/MemberCenterLocalizable.strings

@@ -109,3 +109,7 @@
 "Free Use 1-Year AI Tools" = "0元领取1年AI";
 
 "Password cannot exceed 30 characters." = "密码不能超过30个字符。";
+
+"1-Year AI Tools Giveaway" = "赠送您一年AI";
+"Free for the first year, then automatically renew at $125.99 annually. You can cancel your subscription anytime." = "首年0元,到期自动续费818.9元/年,可随时取消";
+"Service Agreement" = "服务协议";

+ 4 - 0
PDF Office/PDF Master/MemberCenter/Assets/zh-Hant.lproj/MemberCenterLocalizable.strings

@@ -110,3 +110,7 @@
 "Free Use 1-Year AI Tools" = "0元領取1年AI";
 
 "Password cannot exceed 30 characters." = "密碼不能超過30個字元。";
+
+"1-Year AI Tools Giveaway" = "贈送您一年AI";
+"Free for the first year, then automatically renew at $125.99 annually. You can cancel your subscription anytime." = "首年0元,到期自動續約818.9元/年,可隨時取消";
+"Service Agreement" = "服務協議";

+ 7 - 2
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

@@ -244,10 +244,15 @@ class KMUserInfoViewController: NSViewController {
             buyNow1Label.stringValue = NSLocalizedString("Upgrade Now", tableName: "MemberCenterLocalizable", comment: "")
         }  else if KMMemberInfo.shared.userScenarioType == .lite_type5 ||
                     KMMemberInfo.shared.userScenarioType == .pro_type1 ||
-                    KMMemberInfo.shared.userScenarioType == .pro_type3 ||
                     KMMemberInfo.shared.userScenarioType == .pro_type4 {
             buyNow1Label.stringValue = NSLocalizedString("Upgrade Now", tableName: "MemberCenterLocalizable", comment: "")
-        } else if KMMemberInfo.shared.userScenarioType == .lite_type7 ||
+        }  else if KMMemberInfo.shared.userScenarioType == .pro_type3 {
+            if(KMMemberInfo.shared.vip_status == 2) {
+                buyNow1Label.stringValue = NSLocalizedString("Renew now", tableName: "MemberCenterLocalizable", comment: "")
+            } else {
+                buyNow1Label.stringValue = NSLocalizedString("Upgrade Now", tableName: "MemberCenterLocalizable", comment: "")
+            }
+        }  else if KMMemberInfo.shared.userScenarioType == .lite_type7 ||
                     KMMemberInfo.shared.userScenarioType == .lite_type8 ||
                     KMMemberInfo.shared.userScenarioType == .lite_type13 {
             buyNow1Label.stringValue = NSLocalizedString("Renew now", tableName: "MemberCenterLocalizable", comment: "")

+ 4 - 3
PDF Office/PDF Master/MemberCenter/WindowsController/KMFreeGetAIWC.swift

@@ -34,6 +34,7 @@ class KMFreeGetAIWC: NSWindowController {
         languageLocalized()
         initializeUI()
         
+        subTitle2.isHidden = true
         subTitle3.isHidden = true
         
         DistributedNotificationCenter.default.addObserver(self, selector: #selector(themeChanged(_:)), name: NSNotification.Name("AppleInterfaceThemeChangedNotification"), object: nil)
@@ -48,8 +49,8 @@ class KMFreeGetAIWC: NSWindowController {
     // MARK: Private Method
     
     private func languageLocalized() -> Void {
-        titleLabel1.stringValue = NSLocalizedString("Successfully subscribe PDF Reader Pro Advanced - Annual Plan!", tableName: "MemberCenterLocalizable", comment: "")
-        subTitle1.stringValue = String(format: " · %@", NSLocalizedString("You get the chance to use AI Tools free for a year on the desktop version", tableName: "MemberCenterLocalizable", comment: ""))
+        titleLabel1.stringValue = NSLocalizedString("1-Year AI Tools Giveaway", tableName: "MemberCenterLocalizable", comment: "")
+        subTitle1.stringValue = String(format: " · %@", NSLocalizedString("Free for the first year, then automatically renew at $125.99 annually. You can cancel your subscription anytime.", tableName: "MemberCenterLocalizable", comment: ""))
         subTitle2.stringValue = String(format: " · %@", NSLocalizedString("Free for the first year, then auto-renewal at $125.99 per year. You can cancel your subscription anytime.", tableName: "MemberCenterLocalizable", comment: ""))
         subTitle3.stringValue = String(format: " · %@", NSLocalizedString("Pick up free AI Tools before 23:59:00, or it will be invalid", tableName: "MemberCenterLocalizable", comment: ""))
         aitoolsLabel.stringValue = NSLocalizedString("Get 1-Year AI Tools with $0", tableName: "MemberCenterLocalizable", comment: "")
@@ -78,7 +79,7 @@ class KMFreeGetAIWC: NSWindowController {
         )
 
         let privacyPolicy = NSLocalizedString("Privacy Policy", tableName: "MemberCenterLocalizable", comment: "")
-        let termsService = NSLocalizedString("Terms of Service", tableName: "MemberCenterLocalizable", comment: "")
+        let termsService = NSLocalizedString("Service Agreement", tableName: "MemberCenterLocalizable", comment: "")
         let attributedString1 = NSMutableAttributedString(string: privacyPolicy)
         let attributedString2 = NSMutableAttributedString(string: termsService)
         let privacyPolicyRange = (privacyPolicy as NSString).range(of: privacyPolicy)