|
@@ -128,6 +128,14 @@ class KMProductCompareWC: NSWindowController {
|
|
@IBOutlet @objc weak var platformsView3: NSView!
|
|
@IBOutlet @objc weak var platformsView3: NSView!
|
|
@IBOutlet @objc weak var platformsView4: NSView!
|
|
@IBOutlet @objc weak var platformsView4: NSView!
|
|
|
|
|
|
|
|
+ @IBOutlet @objc weak var giftAIImage1: NSImageView!
|
|
|
|
+ @IBOutlet @objc weak var giftAILabel1: NSTextField!
|
|
|
|
+ @IBOutlet @objc weak var giftAIImage2: NSImageView!
|
|
|
|
+ @IBOutlet @objc weak var giftAILabel2: NSTextField!
|
|
|
|
+ @IBOutlet @objc weak var giftAIImage3: NSImageView!
|
|
|
|
+ @IBOutlet @objc weak var giftAILabel3: NSTextField!
|
|
|
|
+ @IBOutlet @objc weak var giftAIImage4: NSImageView!
|
|
|
|
+ @IBOutlet @objc weak var giftAILabel4: NSTextField!
|
|
|
|
|
|
private var model = KMProductModel.shared
|
|
private var model = KMProductModel.shared
|
|
private var cancellables = Set<AnyCancellable>()
|
|
private var cancellables = Set<AnyCancellable>()
|
|
@@ -361,11 +369,16 @@ class KMProductCompareWC: NSWindowController {
|
|
standardPlanPurchaseLbl.stringValue = NSLocalizedString("Subscribe", comment: "")
|
|
standardPlanPurchaseLbl.stringValue = NSLocalizedString("Subscribe", comment: "")
|
|
if KMMemberInfo.shared.userScenarioType == .lite_type3 ||
|
|
if KMMemberInfo.shared.userScenarioType == .lite_type3 ||
|
|
KMMemberInfo.shared.userScenarioType == .lite_type11 {
|
|
KMMemberInfo.shared.userScenarioType == .lite_type11 {
|
|
- advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Renew now",tableName: "MemberCenterLocalizable", comment: "“")
|
|
|
|
|
|
+ advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Renew now",tableName: "MemberCenterLocalizable", comment: "")
|
|
} else {
|
|
} else {
|
|
advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Subscribe", comment: "")
|
|
advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Subscribe", comment: "")
|
|
}
|
|
}
|
|
permanentPurchaseLbl.stringValue = NSLocalizedString("Purchase", comment: "")
|
|
permanentPurchaseLbl.stringValue = NSLocalizedString("Purchase", comment: "")
|
|
|
|
+
|
|
|
|
+ giftAILabel1.stringValue = NSLocalizedString("1-Year AI Tools Giveaway",tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
+ giftAILabel2.stringValue = NSLocalizedString("1-Year AI Tools Giveaway",tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
+ giftAILabel3.stringValue = NSLocalizedString("1-Year AI Tools Giveaway",tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
+ giftAILabel4.stringValue = NSLocalizedString("1-Year AI Tools Giveaway",tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
|
|
#if VERSION_FREE
|
|
#if VERSION_FREE
|
|
#if VERSION_DMG
|
|
#if VERSION_DMG
|
|
@@ -414,9 +427,7 @@ class KMProductCompareWC: NSWindowController {
|
|
}
|
|
}
|
|
if(!isTrialPeriod &&
|
|
if(!isTrialPeriod &&
|
|
KMMemberInfo.shared.canTrail) {
|
|
KMMemberInfo.shared.canTrail) {
|
|
- if(model.state == .trial) {
|
|
|
|
- advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Free Trial", comment: "")
|
|
|
|
- }
|
|
|
|
|
|
+ advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Free Trial", comment: "")
|
|
}
|
|
}
|
|
|
|
|
|
// AppStore 免费版本
|
|
// AppStore 免费版本
|
|
@@ -444,6 +455,9 @@ class KMProductCompareWC: NSWindowController {
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
#else
|
|
#else
|
|
|
|
+ if IAPProductsManager.default().fourDevicesAllAccessPack12months_pro.isTrialPeriod == false && KMMemberInfo.shared.canTrail {
|
|
|
|
+ advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Free Trial", comment: "")
|
|
|
|
+ }
|
|
// AppStore 付费版
|
|
// AppStore 付费版
|
|
if model.state == .pro_Base {
|
|
if model.state == .pro_Base {
|
|
if KMMemberInfo.shared.userScenarioType == .pro_type3 {
|
|
if KMMemberInfo.shared.userScenarioType == .pro_type3 {
|
|
@@ -512,6 +526,15 @@ class KMProductCompareWC: NSWindowController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ giftAILabel1.textColor = NSColor(named: "FFFFFF") ?? NSColor.white
|
|
|
|
+ giftAILabel1.font = NSFont.SFProTextRegularFont(12)
|
|
|
|
+ giftAILabel2.textColor = NSColor(named: "FFFFFF") ?? NSColor.white
|
|
|
|
+ giftAILabel2.font = NSFont.SFProTextRegularFont(12)
|
|
|
|
+ giftAILabel3.textColor = NSColor(named: "FFFFFF") ?? NSColor.white
|
|
|
|
+ giftAILabel3.font = NSFont.SFProTextRegularFont(12)
|
|
|
|
+ giftAILabel4.textColor = NSColor(named: "FFFFFF") ?? NSColor.white
|
|
|
|
+ giftAILabel4.font = NSFont.SFProTextRegularFont(12)
|
|
|
|
+
|
|
value1InfoTypeBox.fillColor = NSColor.clear
|
|
value1InfoTypeBox.fillColor = NSColor.clear
|
|
value1InfoTypeBox.borderWidth = 0
|
|
value1InfoTypeBox.borderWidth = 0
|
|
sixMouthProLabel.textColor = .white
|
|
sixMouthProLabel.textColor = .white
|
|
@@ -547,6 +570,14 @@ class KMProductCompareWC: NSWindowController {
|
|
topSelectBox2.isHidden = true
|
|
topSelectBox2.isHidden = true
|
|
topSelectBox3.isHidden = true
|
|
topSelectBox3.isHidden = true
|
|
topSelectBox4.isHidden = true
|
|
topSelectBox4.isHidden = true
|
|
|
|
+ giftAIImage1.isHidden = true
|
|
|
|
+ giftAILabel1.isHidden = true
|
|
|
|
+ giftAIImage2.isHidden = true
|
|
|
|
+ giftAILabel2.isHidden = true
|
|
|
|
+ giftAIImage3.isHidden = true
|
|
|
|
+ giftAILabel3.isHidden = true
|
|
|
|
+ giftAIImage4.isHidden = true
|
|
|
|
+ giftAILabel4.isHidden = true
|
|
|
|
|
|
freeInfoLabel.font = NSFont.UbuntuMediumFontWithSize(14)
|
|
freeInfoLabel.font = NSFont.UbuntuMediumFontWithSize(14)
|
|
standardPlanInfoLabel.font = NSFont.UbuntuMediumFontWithSize(14)
|
|
standardPlanInfoLabel.font = NSFont.UbuntuMediumFontWithSize(14)
|
|
@@ -589,6 +620,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox4.contentView = permanentInfoView
|
|
topsubBox4.contentView = permanentInfoView
|
|
backgroundImage1.isHidden = true
|
|
backgroundImage1.isHidden = true
|
|
topSelectBox3.isHidden = false
|
|
topSelectBox3.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage3.isHidden = false
|
|
|
|
+ giftAILabel3.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 149.5
|
|
topsubBoxWidth1.constant = 149.5
|
|
topsubBoxWidth2.constant = 149.5
|
|
topsubBoxWidth2.constant = 149.5
|
|
topsubBoxWidth3.constant = 149.5
|
|
topsubBoxWidth3.constant = 149.5
|
|
@@ -601,6 +636,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox4.isHidden = true
|
|
topsubBox4.isHidden = true
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topSelectBox1.isHidden = false
|
|
topSelectBox1.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage1.isHidden = false
|
|
|
|
+ giftAILabel1.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 320.0
|
|
topsubBoxWidth1.constant = 320.0
|
|
} else if model.state == .dmg_Upgrades2 {
|
|
} else if model.state == .dmg_Upgrades2 {
|
|
contentWidth = 689.0
|
|
contentWidth = 689.0
|
|
@@ -610,6 +649,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox4.isHidden = true
|
|
topsubBox4.isHidden = true
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topSelectBox1.isHidden = false
|
|
topSelectBox1.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage1.isHidden = false
|
|
|
|
+ giftAILabel1.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 320.0
|
|
topsubBoxWidth1.constant = 320.0
|
|
} else if model.state == .lite_Base {
|
|
} else if model.state == .lite_Base {
|
|
contentWidth = 970.0
|
|
contentWidth = 970.0
|
|
@@ -619,6 +662,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox2.contentView = value1InfoView
|
|
topsubBox2.contentView = value1InfoView
|
|
topsubBox3.contentView = permanentInfoView
|
|
topsubBox3.contentView = permanentInfoView
|
|
topSelectBox2.isHidden = false
|
|
topSelectBox2.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage2.isHidden = false
|
|
|
|
+ giftAILabel2.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 179.0
|
|
topsubBoxWidth1.constant = 179.0
|
|
topsubBoxWidth2.constant = 240.0
|
|
topsubBoxWidth2.constant = 240.0
|
|
topsubBoxWidth3.constant = 179.0
|
|
topsubBoxWidth3.constant = 179.0
|
|
@@ -630,6 +677,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox4.isHidden = true
|
|
topsubBox4.isHidden = true
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topSelectBox1.isHidden = false
|
|
topSelectBox1.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage1.isHidden = false
|
|
|
|
+ giftAILabel1.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 320.0
|
|
topsubBoxWidth1.constant = 320.0
|
|
} else if model.state == .pro_Base {
|
|
} else if model.state == .pro_Base {
|
|
contentWidth = 970.0
|
|
contentWidth = 970.0
|
|
@@ -640,6 +691,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox2.contentView = permanentInfoView
|
|
topsubBox2.contentView = permanentInfoView
|
|
backgroundImage1.isHidden = true
|
|
backgroundImage1.isHidden = true
|
|
topSelectBox1.isHidden = false
|
|
topSelectBox1.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage1.isHidden = false
|
|
|
|
+ giftAILabel1.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 299.0
|
|
topsubBoxWidth1.constant = 299.0
|
|
topsubBoxWidth2.constant = 299.0
|
|
topsubBoxWidth2.constant = 299.0
|
|
} else if model.state == .pro_Advanced {
|
|
} else if model.state == .pro_Advanced {
|
|
@@ -650,6 +705,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox4.isHidden = true
|
|
topsubBox4.isHidden = true
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topsubBox1.contentView = advancedPlanInfoView
|
|
topSelectBox1.isHidden = false
|
|
topSelectBox1.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage1.isHidden = false
|
|
|
|
+ giftAILabel1.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 320.0
|
|
topsubBoxWidth1.constant = 320.0
|
|
} else {
|
|
} else {
|
|
// model.state == .trial
|
|
// model.state == .trial
|
|
@@ -661,6 +720,10 @@ class KMProductCompareWC: NSWindowController {
|
|
topsubBox2.contentView = advancedPlanInfoView
|
|
topsubBox2.contentView = advancedPlanInfoView
|
|
backgroundImage1.isHidden = true
|
|
backgroundImage1.isHidden = true
|
|
topSelectBox2.isHidden = false
|
|
topSelectBox2.isHidden = false
|
|
|
|
+ if KMMemberInfo.shared.vip_levels == "1" {
|
|
|
|
+ giftAIImage2.isHidden = false
|
|
|
|
+ giftAILabel2.isHidden = false
|
|
|
|
+ }
|
|
topsubBoxWidth1.constant = 179.0
|
|
topsubBoxWidth1.constant = 179.0
|
|
topsubBoxWidth2.constant = 240.0
|
|
topsubBoxWidth2.constant = 240.0
|
|
}
|
|
}
|
|
@@ -941,6 +1004,26 @@ class KMProductCompareWC: NSWindowController {
|
|
#endif
|
|
#endif
|
|
#else
|
|
#else
|
|
// AppStore 付费版
|
|
// AppStore 付费版
|
|
|
|
+// value1PurchaseBtnLbl.stringValue = NSLocalizedString("Subscribe", comment: "")
|
|
|
|
+ let fourDevicesAllAccessPack12months_pro = IAPProductsManager.default().fourDevicesAllAccessPack12months_pro
|
|
|
|
+ let standardAddDevicesAllAccessPack12months_pro = IAPProductsManager.default().standardAddDevicesAllAccessPack12months_pro
|
|
|
|
+ let advancedAddDevicesAllAccessPack12months_pro = IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_pro
|
|
|
|
+ let advancedAdd2DevicesAllAccessPack12months_pro = IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_pro
|
|
|
|
+// let pdfToOfficePackPermanent_pro = IAPProductsManager.default().pdfToOfficePackPermanent_pro
|
|
|
|
+ let isTrialPeriod_year = fourDevicesAllAccessPack12months_pro?.isTrialPeriod ?? false
|
|
|
|
+ let isTrialPeriod_standard = standardAddDevicesAllAccessPack12months_pro?.isTrialPeriod ?? false
|
|
|
|
+ let isTrialPeriod_advanced1 = advancedAddDevicesAllAccessPack12months_pro?.isTrialPeriod ?? false
|
|
|
|
+ let isTrialPeriod_advanced2 = advancedAdd2DevicesAllAccessPack12months_pro?.isTrialPeriod ?? false
|
|
|
|
+ let isSubscribed_year = fourDevicesAllAccessPack12months_pro?.isSubscribed ?? false
|
|
|
|
+ let isSubscribed_standard = standardAddDevicesAllAccessPack12months_pro?.isSubscribed ?? false
|
|
|
|
+ let isSubscribed_advanced1 = advancedAddDevicesAllAccessPack12months_pro?.isSubscribed ?? false
|
|
|
|
+ let isSubscribed_advanced2 = advancedAdd2DevicesAllAccessPack12months_pro?.isSubscribed ?? false
|
|
|
|
+ let introductoryPrice_year = fourDevicesAllAccessPack12months_pro?.product?.introductoryPrice
|
|
|
|
+ let introductoryPrice_standard = standardAddDevicesAllAccessPack12months_pro?.product?.introductoryPrice
|
|
|
|
+ let introductoryPrice_advanced1 = advancedAddDevicesAllAccessPack12months_pro?.product?.introductoryPrice
|
|
|
|
+ let introductoryPrice_advanced2 = advancedAdd2DevicesAllAccessPack12months_pro?.product?.introductoryPrice
|
|
|
|
+
|
|
|
|
+
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1473,6 +1556,8 @@ extension KMProductCompareWC: NSTableViewDelegate, NSTableViewDataSource {
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.viewWidth1.constant = 299.0
|
|
cellView.viewWidth1.constant = 299.0
|
|
cellView.cellView1.isHidden = false
|
|
cellView.cellView1.isHidden = false
|
|
|
|
+ cellView.cellView2.isHidden = false
|
|
|
|
+ cellView.viewWidth2.constant = 299.0
|
|
} else if model.state == .pro_Advanced {
|
|
} else if model.state == .pro_Advanced {
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.viewWidth1.constant = 320.0
|
|
cellView.viewWidth1.constant = 320.0
|