|
@@ -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 {
|