|
@@ -915,13 +915,16 @@ class KMProductCompareWC: NSWindowController {
|
|
|
standardPlanPurchaseLblBtn.isEnabled = standardPlanPurchaseButton.isEnabled
|
|
|
advancedPlanPurchaseLblBtn.isEnabled = advancedPlanPurchaseButton.isEnabled
|
|
|
|
|
|
- let averageMonthPrice: String?
|
|
|
- let monthPrice: String?
|
|
|
- let averageMonthPriceDiscount: String?
|
|
|
- let monthPriceDiscount: String?
|
|
|
- var allPrice: String?
|
|
|
+ var averageMonthPrice: String? = nil
|
|
|
+ var monthPrice: String? = nil
|
|
|
+ var averageMonthPriceDiscount: String? = nil
|
|
|
+ var monthPriceDiscount: String? = nil
|
|
|
+ var allPrice: String? = nil
|
|
|
let isOffers_newlyMonth = fourDevicesAllAccessPackNew6Months_lite?.isOffers ?? false
|
|
|
let isOffers_year = fourDevicesAllAccessPackNew12months_lite?.isOffers ?? false
|
|
|
+
|
|
|
+ var introPrice: String? = nil
|
|
|
+ var introAveragePrice: String? = nil
|
|
|
|
|
|
if isOffers_newlyMonth {
|
|
|
specialView1.isHidden = false
|
|
@@ -929,11 +932,15 @@ class KMProductCompareWC: NSWindowController {
|
|
|
monthPrice = fourDevicesAllAccessPackNew6Months_lite?.offersPrice()
|
|
|
averageMonthPriceDiscount = fourDevicesAllAccessPackNew6Months_lite?.discountAveragePrice()
|
|
|
monthPriceDiscount = fourDevicesAllAccessPackNew6Months_lite?.discountPrice()
|
|
|
+ introPrice = fourDevicesAllAccessPackNew6Months_lite?.introPrice()
|
|
|
+ introAveragePrice = fourDevicesAllAccessPackNew6Months_lite?.introAveragePrice()
|
|
|
} else if isOffers_year {
|
|
|
averageMonthPrice = fourDevicesAllAccessPackNew12months_lite?.offersAveragePrice()
|
|
|
monthPrice = fourDevicesAllAccessPackNew12months_lite?.offersPrice()
|
|
|
averageMonthPriceDiscount = fourDevicesAllAccessPackNew12months_lite?.discountAveragePrice()
|
|
|
monthPriceDiscount = fourDevicesAllAccessPackNew12months_lite?.discountPrice()
|
|
|
+ introPrice = fourDevicesAllAccessPackNew12months_lite?.introPrice()
|
|
|
+ introAveragePrice = fourDevicesAllAccessPackNew12months_lite?.introAveragePrice()
|
|
|
} else {
|
|
|
specialView1.isHidden = true
|
|
|
if !model.isPurchaseSwitch {
|
|
@@ -941,11 +948,15 @@ class KMProductCompareWC: NSWindowController {
|
|
|
monthPrice = fourDevicesAllAccessPackNew6Months_lite?.price()
|
|
|
averageMonthPriceDiscount = fourDevicesAllAccessPackNew6Months_lite?.discountAveragePrice()
|
|
|
monthPriceDiscount = fourDevicesAllAccessPackNew6Months_lite?.discountPrice()
|
|
|
+ introPrice = fourDevicesAllAccessPackNew6Months_lite?.introPrice()
|
|
|
+ introAveragePrice = fourDevicesAllAccessPackNew6Months_lite?.introAveragePrice()
|
|
|
} else {
|
|
|
averageMonthPrice = fourDevicesAllAccessPackNew12months_lite?.averagePrice()
|
|
|
monthPrice = fourDevicesAllAccessPackNew12months_lite?.price()
|
|
|
averageMonthPriceDiscount = fourDevicesAllAccessPackNew12months_lite?.discountAveragePrice()
|
|
|
monthPriceDiscount = fourDevicesAllAccessPackNew12months_lite?.discountPrice()
|
|
|
+ introPrice = fourDevicesAllAccessPackNew12months_lite?.introPrice()
|
|
|
+ introAveragePrice = fourDevicesAllAccessPackNew12months_lite?.introAveragePrice()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -992,9 +1003,16 @@ class KMProductCompareWC: NSWindowController {
|
|
|
value1PurchaseOriPriceLbl.isHidden = false
|
|
|
billedTopConst.constant = 16
|
|
|
} else {
|
|
|
- value1PurchaseLabel.stringValue = String(format: "%@/%@", monthPrice ?? "", NSLocalizedString("12 months", comment: ""))
|
|
|
- value1PurchaseOriPriceLbl.isHidden = true
|
|
|
- billedTopConst.constant = 0
|
|
|
+ if let data = introPrice, data.isEmpty == false {
|
|
|
+ value1PurchaseLabel.stringValue = String(format: "%@/%@", data, NSLocalizedString("12 months", comment: ""))
|
|
|
+ value1PurchaseOriPriceLbl.stringValue = String(format: "%@/%@", monthPrice ?? "", NSLocalizedString("12 months", comment: ""))
|
|
|
+ value1PurchaseOriPriceLbl.isHidden = false
|
|
|
+ billedTopConst.constant = 16
|
|
|
+ } else {
|
|
|
+ value1PurchaseLabel.stringValue = String(format: "%@/%@", monthPrice ?? "", NSLocalizedString("12 months", comment: ""))
|
|
|
+ value1PurchaseOriPriceLbl.isHidden = true
|
|
|
+ billedTopConst.constant = 0
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if model.isShowSale {
|
|
@@ -1003,18 +1021,25 @@ class KMProductCompareWC: NSWindowController {
|
|
|
value1PurchaseOriPriceLbl.isHidden = false
|
|
|
billedTopConst.constant = 16
|
|
|
} else {
|
|
|
- value1PurchaseLabel.stringValue = String(format: "%@/%@", monthPrice ?? "", NSLocalizedString("6mon", comment: ""))
|
|
|
- value1PurchaseOriPriceLbl.isHidden = true
|
|
|
- billedTopConst.constant = 0
|
|
|
+ if let data = introPrice, data.isEmpty == false {
|
|
|
+ value1PurchaseLabel.stringValue = String(format: "%@/%@", data, NSLocalizedString("6mon", comment: ""))
|
|
|
+ value1PurchaseOriPriceLbl.stringValue = String(format: "%@/%@", monthPrice ?? "", NSLocalizedString("6mon", comment: ""))
|
|
|
+ value1PurchaseOriPriceLbl.isHidden = false
|
|
|
+ billedTopConst.constant = 16
|
|
|
+ } else {
|
|
|
+ value1PurchaseLabel.stringValue = String(format: "%@/%@", monthPrice ?? "", NSLocalizedString("6mon", comment: ""))
|
|
|
+ value1PurchaseOriPriceLbl.isHidden = true
|
|
|
+ billedTopConst.constant = 0
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
value1PurchaseLabel.textColor = NSColor(red: 1.0, green: 231.0/255.0, blue: 106.0/255.0, alpha: 1.0)
|
|
|
- value1PurchaseOriPriceLbl.textColor = NSColor(white: 1.0, alpha: 0.7)
|
|
|
+ value1PurchaseOriPriceLbl.textColor = NSColor(hex: "#FFE76A")
|
|
|
|
|
|
value1PurchaseOriPriceLbl.attributedStringValue = NSAttributedString(string: value1PurchaseOriPriceLbl.stringValue, attributes: [
|
|
|
.font : NSFont.SFProTextRegularFont(12),
|
|
|
- .foregroundColor: NSColor(white: 1, alpha: 0.7),
|
|
|
+ .foregroundColor: NSColor(hex: "#FFE76A"),
|
|
|
.strikethroughStyle: NSUnderlineStyle.single.rawValue
|
|
|
])
|
|
|
var tTips: String
|
|
@@ -1058,13 +1083,21 @@ class KMProductCompareWC: NSWindowController {
|
|
|
if model.isShowSale {
|
|
|
tTips = String(format: NSLocalizedString("%@ for the first year's subscription", comment: ""), monthPriceDiscount ?? "")
|
|
|
} else {
|
|
|
- tTips = String(format: NSLocalizedString("Billed every 12 months at %@", comment: ""), monthPrice ?? "")
|
|
|
+ if let data = introPrice, data.isEmpty == false {
|
|
|
+ tTips = String(format: NSLocalizedString("Auto-renew at %@/year after expiration Cancel anytime (Tax Incl.)", comment: ""), monthPrice ?? "")
|
|
|
+ } else {
|
|
|
+ tTips = String(format: NSLocalizedString("Billed every 12 months at %@", comment: ""), monthPrice ?? "")
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if model.isShowSale {
|
|
|
tTips = String(format: NSLocalizedString("%@ for the first 6-month subscription", comment: ""), monthPriceDiscount ?? "")
|
|
|
} else {
|
|
|
- tTips = String(format: NSLocalizedString("Billed every 6 months at %@", comment: ""), monthPrice ?? "")
|
|
|
+ if let data = introPrice, data.isEmpty == false {
|
|
|
+ tTips = String(format: NSLocalizedString("Auto-renew at %@/6-month after expiration Cancel anytime (Tax Incl.)", comment: ""), monthPrice ?? "")
|
|
|
+ } else {
|
|
|
+ tTips = String(format: NSLocalizedString("Billed every 6 months at %@", comment: ""), monthPrice ?? "")
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
#endif
|