Browse Source

【订阅】订阅流程调整

lizhe 1 year ago
parent
commit
244aca1ec0

+ 1 - 1
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -580,7 +580,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     private func _km_saveForWatermark(openAccessoryView: Bool = true, subscribeDidClick: (()->Void)? = nil, callback:@escaping (_ needSave: Bool, _ param: Any...)->Void) {
         Task { @MainActor in
             if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                let _ = KMSubscribeWaterMarkWindowController.show(window: NSApp.mainWindow!) {
+                let _ = KMSubscribeWaterMarkWindowController.show(window: NSApp.mainWindow!, isContinue:false, type: .save) {
                     if let _callback = subscribeDidClick {
                         _callback()
                     }

+ 3 - 0
PDF Office/PDF Master/Class/Home/ViewController/KMAITranslationVC.swift

@@ -211,6 +211,9 @@ class KMAITranslationVC: NSViewController {
                                     }
                                 }
                             } else if result == .alertSecondButtonReturn {
+                                DispatchQueue.main.async {
+                                    self.hiddenProgressWindow()
+                                }
                                 return
                             }
                         }

+ 43 - 74
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/KMComparativeTableViewController.swift

@@ -63,7 +63,7 @@ class KMComparativeTableViewController: NSWindowController {
      @param window 弹出window
      @param type 从什么页面跳转到比较表 默认batch
      */
-    static func show(window: NSWindow, _ type: KMComparativeInputType = .unknown) -> KMComparativeTableViewController? {
+    static func show(window: NSWindow, _ type: KMComparativeInputType = .unknown, inputType: KMSubscribeWaterMarkType = .none) -> KMComparativeTableViewController? {
 #if VERSION_DMG
         if KMLightMemberManager.manager.isLogin() {
             KMPurchaseManager.manager.showStore()
@@ -73,68 +73,6 @@ class KMComparativeTableViewController: NSWindowController {
 #endif
         
 #if VERSION_FREE
-        if KMLightMemberManager.manager.isLogin() && (type == .upgrade || type == .equity || type == .accountInfo) {
-            let controller: KMComparativeTableViewController = KMComparativeTableViewController.init(windowNibName: "KMComparativeTableViewController")
-            controller.inputType = type
-
-            controller.loginAction = { controller in
-                comparativeController = nil
-                comparativeMainWindow?.endSheet(controller.window!)
-                comparativeMainWindow = nil
-                controller.close()
-
-                if NSApp.mainWindow != nil {
-                    KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable, .login)
-                }
-            }
-
-            controller.signUpAction = { controller in
-                comparativeController = nil
-                comparativeMainWindow?.endSheet(controller.window!)
-                comparativeMainWindow = nil
-                controller.close()
-
-                if NSApp.mainWindow != nil {
-                    KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable, .register)
-                }
-            }
-            
-            controller.subscriptionAction = { controller in
-                controller.subscribeAction(controller: controller)
-            }
-            
-            controller.restoreAction = { controller in
-                controller.subscribeAction(controller: controller, isRestore:true)
-            }
-            
-            window.beginSheet(controller.window!)
-
-            comparativeController = controller
-            comparativeMainWindow = window
-            
-//            if type == .loginSuccess && KMLightMemberManager.manager.purchaseState != .subscription {
-//                controller.subscribeAction(controller: controller)
-//            }
-            return controller
-        } else {
-            if type == .loginCancel {
-                
-            } else {
-                KMSubscribeWaterMarkWindowController.show(window: NSApp.mainWindow!, isContinue: true) { isSubscribeSuccess, isWaterMarkExport, isClose in
-                    
-                }
-            }
-        }
-#endif
-        return nil
-    }
-    
-    /**
-     @abstract AI功能弹出比较表
-     @param window 弹出window
-     @param type 从什么页面跳转到比较表 默认batch
-     */
-    static func aiFunctionShow(window: NSWindow, _ type: KMComparativeInputType = .unknown) -> KMComparativeTableViewController? {
         let controller: KMComparativeTableViewController = KMComparativeTableViewController.init(windowNibName: "KMComparativeTableViewController")
         controller.inputType = type
 
@@ -172,7 +110,13 @@ class KMComparativeTableViewController: NSWindowController {
 
         comparativeController = controller
         comparativeMainWindow = window
+        
+        if type == .loginSuccess && KMLightMemberManager.manager.purchaseState != .subscription {
+            controller.subscribeAction(controller: controller)
+        }
         return controller
+#endif
+        return nil
     }
     
     override func windowDidLoad() {
@@ -271,17 +215,7 @@ class KMComparativeTableViewController: NSWindowController {
                 }
             }
         } else {
-            comparativeController = nil
-            comparativeMainWindow?.endSheet(controller.window!)
-            comparativeMainWindow = nil
-            controller.close()
-
-            var email: String = UserDefaults.standard.value(forKey: "kLoginEmail") as? String ?? ""
-            if email.count == 0 {
-                let tempController = KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable, .register)
-            } else {
-                let tempController = KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable)
-            }
+            KMComparativeTableViewController.loginAlertView()
         }
     }
     
@@ -315,4 +249,39 @@ class KMComparativeTableViewController: NSWindowController {
             }
         })
     }
+    
+    static func loginAlertView() {
+        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
+            let alert = NSAlert()
+            alert.messageText = NSLocalizedString("Please login or register to proceed to the next step", comment: "")
+            alert.informativeText = NSLocalizedString("As a PDF Master member, you can get unlimited conversion, merge function, AI free use times and other advanced rights.", comment: "")
+//            alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
+            alert.addButton(withTitle: NSLocalizedString("OK", 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
+                    if (result == .alertFirstButtonReturn) {
+                        comparativeMainWindow?.endSheet(comparativeController!.window!)
+                        comparativeMainWindow = nil
+                        comparativeController!.close()
+                        comparativeController = nil
+
+                        if NSApp.mainWindow != nil {
+                            var email: String = UserDefaults.standard.value(forKey: "kLoginEmail") as? String ?? ""
+                            if email.count == 0 {
+                                let tempController = KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable, .register)
+                            } else {
+                                let tempController = KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable)
+                            }
+                        }
+                    } else if result == .alertSecondButtonReturn {
+                        return
+                    }
+                }
+            }
+        })
+    }
 }

+ 2 - 2
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/KMComparativeTableViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

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

@@ -39,6 +39,7 @@ var subscribeWaterMarkMainWindow: NSWindow?
     case aiTranslate
     case aiRewrite
     case aiCorrect
+    case save
     
     func isConvertType() -> Bool {
         if (self == .toWord || self == .toExcel || self == .toPPT || self == .toRTF || self == .toCSV || self == .toHTML || self == .toText || self == .toImage) {
@@ -52,6 +53,7 @@ typealias KMSubscribeWaterMarkWindowControllerCloseAction = (_ controller: KMSub
 typealias KMSubscribeWaterMarkWindowControllerWatermarkExportAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
 typealias KMSubscribeWaterMarkWindowControllerSubscribeAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
 
+var tempType: KMSubscribeWaterMarkType = .none
 class KMSubscribeWaterMarkWindowController: NSWindowController {
 
     @IBOutlet weak var waterMarkView: KMSubscribeWaterMarkView!
@@ -65,7 +67,7 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
     var isAI: Bool?
     var type: KMSubscribeWaterMarkType? {
         didSet {
-            self.waterMarkView.type = type
+            self.waterMarkView?.type = type
         }
     }
     
@@ -86,6 +88,7 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
     
     //MARK: 打开文件
     @objc static func show(window: NSWindow, isContinue: Bool = false, type: KMSubscribeWaterMarkType = .none, subscribeDidClick: (()->Void)? = nil, completion: @escaping (_ isSubscribeSuccess: Bool, _ isWaterMarkExport: Bool, _ isClose: Bool) -> Void) -> KMSubscribeWaterMarkWindowController {
+        tempType = type
         var isAI = false
         if type == .aiCorrect ||
             type == .aiRewrite ||
@@ -119,8 +122,8 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
             
             window.beginSheet(subscribeWaterMarkWindowController.window!)
             subscribeWaterMarkWindowController.window?.center()
-            
             subscribeWaterMarkWindowController.type = type
+            subscribeWaterMarkWindowController.reloadData()
             
             subscribeWaterMarkWindowController.closeAction = { controller in
                 completion(false, false, true)
@@ -153,8 +156,8 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
                 controller.window?.close()
                 subscribeWaterMarkController = nil
                 
-                if KMLightMemberManager.manager.isLogin() {
-                    KMComparativeTableViewController.show(window: subscribeWaterMarkMainWindow ?? NSWindow(), .equity)
+                if KMLightMemberManager.manager.isLogin() || type == .save {
+                    KMComparativeTableViewController.show(window: subscribeWaterMarkMainWindow ?? NSWindow(), .equity, inputType: type)
                 } else {
                     KMLoginWindowController.show(window: subscribeWaterMarkMainWindow ?? NSWindow())
                 }
@@ -172,6 +175,9 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
                     } else {
                         subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Later", comment: "")
                     }
+                } else if (type == .save) {
+                    subscribeWaterMarkWindowController.waterMarkView.subscribeLabel.stringValue = NSLocalizedString("Upgrade Now", comment: "")
+                    subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
                 } else {
                     subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
                 }
@@ -186,6 +192,7 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
     func setup() {
         self.window?.contentView?.backgroundColor(NSColor(hex: "#FFFFFF"))
         self.waterMarkView.waterExportButton.title = ""
+        self.waterMarkView.subscribeLabel.stringValue = ""
         self.waterMarkView.closeAction = { [weak self] view in
             guard let callBack = self?.closeAction else { return }
             
@@ -220,11 +227,13 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
     }
     
     func reloadData() {
-        if KMLightMemberManager.manager.isLogin() {
-            self.waterViewHeightConstrain.constant = 624
+        if KMLightMemberManager.manager.isLogin() || tempType == .save {
+            self.waterViewHeightConstrain.constant = 506
         } else {
-            self.waterViewHeightConstrain.constant = 485
+            self.waterViewHeightConstrain.constant = 643
         }
+        self.waterMarkView.type = tempType
+        self.waterMarkView.updateConstraints()
     }
     
     static func isSampleController() -> KMSubscribeWaterMarkWindowController {

+ 7 - 9
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -18,18 +18,16 @@
         <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="380" height="505"/>
+            <rect key="contentRect" x="196" y="240" width="450" height="643"/>
             <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <value key="minSize" type="size" width="448" height="505"/>
-            <value key="maxSize" type="size" width="448" height="505"/>
             <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="380" height="505"/>
+                <rect key="frame" x="0.0" y="0.0" width="450" height="643"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="kKR-sQ-MOd" customClass="KMSubscribeWaterMarkView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="380" height="505"/>
+                        <rect key="frame" x="0.0" y="0.0" width="450" height="643"/>
                         <constraints>
-                            <constraint firstAttribute="height" constant="505" id="hGQ-d7-hqP"/>
+                            <constraint firstAttribute="height" constant="643" id="hGQ-d7-hqP"/>
                         </constraints>
                     </customView>
                 </subviews>
@@ -43,7 +41,7 @@
             <connections>
                 <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
             </connections>
-            <point key="canvasLocation" x="-293" y="-100"/>
+            <point key="canvasLocation" x="-293" y="-29.5"/>
         </window>
     </objects>
 </document>

+ 7 - 7
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkCollectionItem.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -17,7 +17,7 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="324" height="66"/>
+            <rect key="frame" x="0.0" y="0.0" width="400" height="66"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UN8-s9-tdC">
@@ -28,7 +28,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ai" id="3QX-xa-XNA"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KPf-lK-ZOs">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KPf-lK-ZOs">
                     <rect key="frame" x="42" y="50" width="360" height="16"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="356" id="Qfq-qo-48g"/>
@@ -39,10 +39,10 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BPg-hS-GYT">
-                    <rect key="frame" x="42" y="-2" width="254" height="48"/>
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BPg-hS-GYT">
+                    <rect key="frame" x="42" y="14" width="354" height="32"/>
                     <constraints>
-                        <constraint firstAttribute="width" constant="250" id="me1-1N-hoI"/>
+                        <constraint firstAttribute="width" constant="350" id="me1-1N-hoI"/>
                     </constraints>
                     <textFieldCell key="cell" title="The trial watermark will be added when you save the file after trying the advanced features" id="C0c-sD-YMa">
                         <font key="font" metaFont="system"/>

+ 23 - 16
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.swift

@@ -38,6 +38,7 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
     
     var type: KMSubscribeWaterMarkType? {
         didSet {
+            self.reloadData()
             self.updateLanguage()
         }
     }
@@ -46,9 +47,9 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
         ["title": "Save without watermark",
          "subtitle": "When you save a document with PDF Master after editing, no watermark will be attached",
          "image": "remove watermark"],
-        ["title": "AI assitant",
-         "subtitle": "Support AI translation, AI rewriting, AI correction",
-         "image": "ai"],
+//        ["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",
          "image": "convert"],
@@ -58,11 +59,17 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
     ]
     
     var beforeLoginDataArray = [
-        ["title": "First 10 Pages of Conversion",
-         "subtitle": "Login to get the first 10 pages PDF Conversion freely.",
+        ["title": "AI Document Processing",
+         "subtitle": "AI Translate; Al Rewrite, AI Correction, Completely free to use 5 times/month.",
+         "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.",
          "image": "convert"],
-        ["title": "Full-Featured Trial",
-         "subtitle": "Unlock and use all features after signing in PDF Master.",
+        ["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.",
+         "image": "merging"],
+        ["title": "Full function trial",
+         "subtitle": "Login will unlock trial of all features.",
          "image": "full function trial"]
     ]
     
@@ -131,7 +138,7 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
     }
     
     override func updateLanguage() {
-        if KMLightMemberManager.manager.isLogin() {
+        if KMLightMemberManager.manager.isLogin() || type == .save {
             self.subTitleContentView.isHidden = true
             self.subtitleContentHeightConstraint.constant = 0
             self.collectionContentViewHeightConstraint.constant = 368
@@ -141,11 +148,11 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
             self.subscribeLabel.stringValue = NSLocalizedString("Upgrade Now", comment: "")
         } else {
             self.subTitleContentView.isHidden = false
-            self.subtitleContentHeightConstraint.constant = 80
-            self.collectionContentViewHeightConstraint.constant = 180
-            self.collectionViewContentTopConstraint.constant = 116
+            self.subtitleContentHeightConstraint.constant = 60
+            self.collectionContentViewHeightConstraint.constant = 330
+            self.collectionViewContentTopConstraint.constant = 96
             self.titleLabel.stringValue = NSLocalizedString("Login Benefits", comment: "")
-            self.waterExportButton.title = NSLocalizedString("Save with Watermark ", comment: "")
+            self.waterExportButton.title = NSLocalizedString("Later", comment: "")
             self.subscribeLabel.stringValue = NSLocalizedString("Login or Sign up", comment: "")
         }
 //        + "  " + NSLocalizedString("Subscription", comment: ""
@@ -164,7 +171,7 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
     }
 
     override func reloadData() {
-        if KMLightMemberManager.manager.isLogin() {
+        if KMLightMemberManager.manager.isLogin() || type == .save {
             self.dataArray = afterLoginDataArray
         } else {
             self.dataArray = beforeLoginDataArray
@@ -232,9 +239,9 @@ extension KMSubscribeWaterMarkView: NSCollectionViewDelegateFlowLayout {
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineHeightMultiple = 1.4
         paragraphStyle.alignment = .left
-        let size: NSSize = string.boundingRect(with: NSSize(width: 250, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextSemibold(14), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        let subtitleSize: NSSize = subtitleString.boundingRect(with: NSSize(width: 250, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        return NSSize(width: 324, height: max(66, size.height + subtitleSize.height + 4))
+        let size: NSSize = string.boundingRect(with: NSSize(width: 350, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextSemibold(14), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
+        let subtitleSize: NSSize = subtitleString.boundingRect(with: NSSize(width: 350, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
+        return NSSize(width: 394, height: max(66, size.height + subtitleSize.height + 4))
     }
 
     public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, insetForSectionAt section: Int) -> NSEdgeInsets {

+ 18 - 18
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.xib

@@ -15,7 +15,7 @@
                 <outlet property="collectionViewContentTopConstraint" destination="1nd-N2-IpE" id="J1u-9e-WUO"/>
                 <outlet property="lineView" destination="FOh-IP-TS8" id="bZg-wu-WLa"/>
                 <outlet property="scrollView" destination="iQs-EU-LBJ" id="bId-Pc-Y9u"/>
-                <outlet property="subTitleContentView" destination="Ja4-Z7-bde" id="z3L-EK-zpP"/>
+                <outlet property="subTitleContentView" destination="Ja4-Z7-bde" id="cYk-lB-HWd"/>
                 <outlet property="subscribeBox" destination="3EV-Lt-ZXO" id="Jg8-D5-UYE"/>
                 <outlet property="subscribeLabel" destination="a4m-EO-i32" id="VHn-E2-Ze2"/>
                 <outlet property="subscribeView" destination="zsU-gX-vjE" id="rOk-hB-ChE"/>
@@ -28,11 +28,11 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="380" height="505"/>
+            <rect key="frame" x="0.0" y="0.0" width="452" height="643"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="q0v-nJ-k2O">
-                    <rect key="frame" x="0.0" y="477" width="380" height="28"/>
+                    <rect key="frame" x="0.0" y="615" width="452" height="28"/>
                     <subviews>
                         <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="msn-nQ-xqN" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
                             <rect key="frame" x="8" y="8" width="12" height="12"/>
@@ -69,7 +69,7 @@
                     </constraints>
                 </customView>
                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2cQ-02-iHc">
-                    <rect key="frame" x="123" y="449" width="134" height="16"/>
+                    <rect key="frame" x="159" y="587" width="134" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Subscription Benefits" id="5tK-VQ-29f">
                         <font key="font" usesAppearanceFont="YES"/>
                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -77,16 +77,16 @@
                     </textFieldCell>
                 </textField>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="MG4-H3-ZA1">
-                    <rect key="frame" x="28" y="173" width="324" height="180"/>
+                    <rect key="frame" x="28" y="311" width="396" height="180"/>
                     <subviews>
                         <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iQs-EU-LBJ">
-                            <rect key="frame" x="0.0" y="0.0" width="324" height="180"/>
+                            <rect key="frame" x="0.0" y="0.0" width="396" height="180"/>
                             <clipView key="contentView" drawsBackground="NO" id="k4V-l0-a8F">
-                                <rect key="frame" x="0.0" y="0.0" width="324" height="180"/>
+                                <rect key="frame" x="0.0" y="0.0" width="396" height="180"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
                                     <collectionView id="G8e-lU-M2R">
-                                        <rect key="frame" x="0.0" y="0.0" width="324" height="180"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="396" height="180"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
                                         <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="1Gk-3q-zuH">
                                             <size key="itemSize" width="50" height="50"/>
@@ -106,7 +106,7 @@
                             </scroller>
                         </scrollView>
                         <imageView hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="X9c-Db-P8e">
-                            <rect key="frame" x="0.0" y="0.0" width="324" height="40"/>
+                            <rect key="frame" x="0.0" y="0.0" width="396" height="40"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="40" id="9Hp-hD-Bbg"/>
                             </constraints>
@@ -125,10 +125,10 @@
                     </constraints>
                 </customView>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ja4-Z7-bde">
-                    <rect key="frame" x="28" y="373" width="324" height="60"/>
+                    <rect key="frame" x="28" y="511" width="396" height="60"/>
                     <subviews>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gOH-TM-kj5">
-                            <rect key="frame" x="6" y="28" width="312" height="32"/>
+                            <rect key="frame" x="6" y="28" width="384" height="32"/>
                             <textFieldCell key="cell" alignment="center" title="This is a trial version. While saving, PDF Master's watermark will be added to the document." id="IIZ-dr-HjX">
                                 <font key="font" usesAppearanceFont="YES"/>
                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -136,7 +136,7 @@
                             </textFieldCell>
                         </textField>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="FOh-IP-TS8">
-                            <rect key="frame" x="0.0" y="0.0" width="324" height="1"/>
+                            <rect key="frame" x="0.0" y="0.0" width="396" height="1"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="1" id="P0i-AM-sJN"/>
                             </constraints>
@@ -147,14 +147,14 @@
                         <constraint firstAttribute="height" constant="60" id="K87-HL-fyQ"/>
                         <constraint firstItem="FOh-IP-TS8" firstAttribute="leading" secondItem="Ja4-Z7-bde" secondAttribute="leading" id="Rwz-0E-Zj1"/>
                         <constraint firstItem="gOH-TM-kj5" firstAttribute="leading" secondItem="Ja4-Z7-bde" secondAttribute="leading" constant="8" id="T6O-zG-DYq"/>
-                        <constraint firstAttribute="width" constant="324" id="dFa-YB-Dgm"/>
+                        <constraint firstAttribute="width" constant="396" id="dFa-YB-Dgm"/>
                         <constraint firstAttribute="bottom" secondItem="FOh-IP-TS8" secondAttribute="bottom" id="in1-PL-P05"/>
                         <constraint firstAttribute="trailing" secondItem="gOH-TM-kj5" secondAttribute="trailing" constant="8" id="vhi-7b-oQH"/>
                         <constraint firstAttribute="trailing" secondItem="FOh-IP-TS8" secondAttribute="trailing" id="z4M-RT-EKq"/>
                     </constraints>
                 </customView>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ki6-ve-E1f">
-                    <rect key="frame" x="28" y="32" width="324" height="40"/>
+                    <rect key="frame" x="28" y="32" width="396" height="40"/>
                     <buttonCell key="cell" type="square" title="Watermark Saving" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="bo3-42-gLB">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
@@ -167,10 +167,10 @@
                     </connections>
                 </button>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="zsU-gX-vjE">
-                    <rect key="frame" x="28" y="88" width="324" height="40"/>
+                    <rect key="frame" x="28" y="88" width="396" height="40"/>
                     <subviews>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="a4m-EO-i32">
-                            <rect key="frame" x="144" y="12" width="37" height="16"/>
+                            <rect key="frame" x="180" y="12" width="37" height="16"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="oDQ-wf-pIe">
                                 <font key="font" usesAppearanceFont="YES"/>
                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -178,9 +178,9 @@
                             </textFieldCell>
                         </textField>
                         <box boxType="custom" borderWidth="0.0" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="3EV-Lt-ZXO" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="0.0" y="0.0" width="324" height="40"/>
+                            <rect key="frame" x="0.0" y="0.0" width="396" height="40"/>
                             <view key="contentView" id="Ajf-rl-zqg">
-                                <rect key="frame" x="0.0" y="0.0" width="324" height="40"/>
+                                <rect key="frame" x="0.0" y="0.0" width="396" height="40"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </view>
                         </box>

+ 1 - 1
PDF Office/PDF Master/Class/KMLightMember/Model/KMLightMemberUserInfo.swift

@@ -69,7 +69,7 @@ class KMLightMemberUserInfo: NSObject, Codable {
 class KMLightMemberUserSubscriptionInfo: NSObject, Codable {
     var endDate: String?
     var id: String?
-    var payType: Int?
+    var payType: Int? //0:未自动续订 1:自动续订
     var platform: Int?
     var status: Int?
     var userId: String?

+ 5 - 1
PDF Office/PDF Master/Class/PDFTools/Convert/Controller/KMConvertBaseWindowController.swift

@@ -363,7 +363,11 @@ class KMConvertBaseWindowController: KMBaseWindowController {
         
         Task { @MainActor in
             if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                let _ = KMSubscribeWaterMarkWindowController.show(window: self.window!, type: self.subscribeWaterMarkType!) { isSubscribeSuccess, isWaterMarkExport, isClose in
+                var isContinue = false
+                if pages.count < 10 {
+                    isContinue = true
+                }
+                let _ = KMSubscribeWaterMarkWindowController.show(window: self.window!, isContinue: isContinue, type: self.subscribeWaterMarkType!) { isSubscribeSuccess, isWaterMarkExport, isClose in
                     if (isClose) {
                         return
                     }