Browse Source

【订阅】登录权益弹窗文案调整

lizhe 1 year ago
parent
commit
f5f14d8bdb

+ 3 - 3
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.swift

@@ -175,13 +175,13 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
             } else {
                 if type == .merge {
                     if (limit) {
-                        subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Later", comment: "")
+                        subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Exceed Times Limit", comment: "")
                     } else {
-                        subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Delete From the File List", comment: "")
+                        subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Delete Files from List", comment: "")
                     }
                 } else if type.isConvertType() {
                     if (limit) {
-                        subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Later", comment: "")
+                        subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Exceed Times Limit", comment: "")
                     } else {
 //                        if KMLightMemberManager.manager.isLogin() {
                             subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Convert First 10 Pages", comment: "")

+ 13 - 14
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.swift

@@ -44,6 +44,7 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
         }
     }
     
+    #if VERSION_FREE
     var afterLoginDataArray = [
         ["title": "Save without Watermark",
          "subtitle": "When you save a document with PDF Master after editing, no watermark will be attached",
@@ -58,19 +59,22 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
          "subtitle": "The trial version can merge only 2 files at a time in batch processing",
          "image": "merging"]
     ]
+    #else
+    
+    #endif
     
     var beforeLoginDataArray = [
-        ["title": "AI Document Processing",
-         "subtitle": "AI Translate; Al Rewrite, AI Correction, Completely free to use 5 times/month.",
+        ["title": "AI Assistant",
+         "subtitle": "AI translation, AI rewriting, AI correction.",
          "image": "ai"],
-        ["title": "Unlimited times to conversion first 10 pages",
-         "subtitle": "Trial Version users can only convert the first 10 pages of a document 2 times.",
+        ["title": "Unlimited Conversion Times",
+         "subtitle": "Free trial users can only convert the first ten pages of a PDF, up to 2 times.",
          "image": "convert"],
-        ["title": "Unlimited times to batch merge 2 documents",
-         "subtitle": "Trial Version users can only merge 2 files at a time in batch processing, and only merge 2 times.",
+        ["title": "Unlimited Merge Times",
+         "subtitle": "Free trial users can merge two files at once, up to 2 times.",
          "image": "merging"],
-        ["title": "Full function trial",
-         "subtitle": "Login will unlock trial of all features.",
+        ["title": "Unlock All Functions",
+         "subtitle": "Log in to free trial all features.",
          "image": "full function trial"]
     ]
     
@@ -166,12 +170,7 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
         }
 //        + "  " + NSLocalizedString("Subscription", comment: ""
         
-        var subtitleString = ""
-        if type == .merge {
-            subtitleString = NSLocalizedString("The trial version can merge only 2 files at a time in batch processing. Login or sign up PDF Master to speed your workflow!", comment: "")
-        } else {
-            subtitleString = NSLocalizedString("Login or sign up PDF Master lets you enjoy all features including annotating, text editing and page organization for FREE!", comment: "")
-        }
+        var subtitleString = NSLocalizedString("Register as a PDF Master member to enjoy premium features", comment: "")
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineHeightMultiple = 1.32
         paragraphStyle.alignment = .left

+ 16 - 0
PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/Appstore/KMInAppPurchaseManager.swift

@@ -413,6 +413,22 @@ extension KMInAppPurchaseManager: SKPaymentTransactionObserver {
                     // ...
                 } else {
                     self.handleAction(state: .verFailed)
+                    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
+                        let alert = NSAlert()
+                        alert.messageText = NSLocalizedString("Unable to Log in", comment: "")
+                        alert.informativeText = NSLocalizedString(error!.localizedDescription, comment: "")
+                        alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
+                        var window = NSApp.mainWindow
+                        if NSApp.mainWindow?.sheets.first != nil {
+                            window = NSApp.mainWindow?.sheets.first
+                        }
+                        if window != nil {
+                            alert.beginSheetModal(for: window!) { result in
+                                
+                            }
+                        }
+                    })
+                    
                     // 购买凭证验证失败,进行购买失败的逻辑
                     // ...
                 }