Browse Source

Merge branch 'develop_v1.2' of git.kdan.cc:Mac_PDF/PDF_Office into develop_v1.2

tangchao 1 year ago
parent
commit
e5f3c19419

+ 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: "")

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

@@ -46,31 +46,31 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
     
     var afterLoginDataArray = [
         ["title": "Save without Watermark",
-         "subtitle": "When you save a document with PDF Master after editing, no watermark will be attached",
+         "subtitle": "Free trial version will add a PDF Master official watermark to the document when saving.",
          "image": "remove watermark"],
 //        ["title": "AI assitant",
 //         "subtitle": "Support AI translation, AI rewriting, AI correction",
 //         "image": "ai"],
-        ["title": "Convert PDF without limitation",
-         "subtitle": "Convert PDF to Office and image without any limitations, get converted files in high quality",
+        ["title": "Convert without Page Limit",
+         "subtitle": "Free trial users can only convert the first 10 pages of a document.",
          "image": "convert"],
-        ["title": "Batch Processing",
-         "subtitle": "The trial version can merge only 2 files at a time in batch processing",
+        ["title": "Merge PDFs without Limitation",
+         "subtitle": "Free trial users can only combine 2 files at once.",
          "image": "merging"]
     ]
     
     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 +166,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
+                                
+                            }
+                        }
+                    })
+                    
                     // 购买凭证验证失败,进行购买失败的逻辑
                     // ...
                 }