Browse Source

【会员】注册成功界面显示调整

lizhe 1 year ago
parent
commit
0a3145b182

+ 13 - 2
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.swift

@@ -52,6 +52,7 @@ class KMRegisterSuccessView: KMBaseXibView {
         self.doneButton.border(.white,0, 20)
         self.doneButton.backgroundColor(NSColor(hex: "#FF852E"))
         self.doneButton.contentTintColor = NSColor(hex: "#FFFFFF")
+        self.doneButton.font = NSFont.SFProTextSemibold(16)
         
         self.textView.delegate = self
         self.textView.isEditable = false
@@ -69,7 +70,17 @@ class KMRegisterSuccessView: KMBaseXibView {
     
     override func reloadData() {
         super.reloadData()
-        
+        if KMLightMemberManager.manager.purchaseState == .subscription {
+            self.doneButton.isEnabled = false
+            self.doneButton.title = NSLocalizedString("Already Subscribed", comment: "")
+            self.doneButton.backgroundColor(NSColor(hex: "#FFD09E"))
+            self.doneButton.contentTintColor = NSColor(hex: "#F7F8FA")
+        } else {
+            self.doneButton.isEnabled = true
+            self.doneButton.title = NSLocalizedString("Subscribe", comment: "")
+            self.doneButton.backgroundColor(NSColor(hex: "#FF852E"))
+            self.doneButton.contentTintColor = NSColor(hex: "#FFFFFF")
+        }
     }
     
     override func updateLanguage() {
@@ -78,7 +89,7 @@ class KMRegisterSuccessView: KMBaseXibView {
         self.label2.stringValue = NSLocalizedString("Unlimited Conversion", comment: "")
         self.label3.stringValue = NSLocalizedString("Save without Watermark", comment: "")
         
-        self.doneButton.title = NSLocalizedString("Subscribe", comment: "")
+//        self.doneButton.title = NSLocalizedString("Subscribe", comment: "")
         
         let string1 = NSLocalizedString("Welcome to Join PDF Master!", comment: "")
         let ParagraphStyle1 = NSMutableParagraphStyle()

+ 2 - 2
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.xib

@@ -25,7 +25,7 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BHA-OV-pZP">
-                    <rect key="frame" x="71" y="56" width="262" height="40"/>
+                    <rect key="frame" x="32" y="56" width="262" height="40"/>
                     <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="Z4z-3P-BWh">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
@@ -180,7 +180,6 @@ DQ
                 <constraint firstItem="acP-iz-Hm7" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Ki4-63-Ucg"/>
                 <constraint firstItem="Kzs-j2-9SX" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="56" id="MNF-Ec-2gf"/>
                 <constraint firstAttribute="trailing" secondItem="rBp-UM-QAb" secondAttribute="trailing" constant="32" id="RAM-Ua-B0M"/>
-                <constraint firstItem="BHA-OV-pZP" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="S1z-ii-bIg"/>
                 <constraint firstItem="acP-iz-Hm7" firstAttribute="top" secondItem="BHA-OV-pZP" secondAttribute="bottom" constant="8" id="Slc-Px-AZS"/>
                 <constraint firstAttribute="bottom" secondItem="BHA-OV-pZP" secondAttribute="bottom" constant="56" id="ZJx-ls-b8f"/>
                 <constraint firstItem="rBp-UM-QAb" firstAttribute="top" secondItem="J5R-ne-OXQ" secondAttribute="bottom" constant="12" id="bRE-vD-0Yb"/>
@@ -188,6 +187,7 @@ DQ
                 <constraint firstAttribute="trailing" secondItem="BSZ-Y0-xj8" secondAttribute="trailing" constant="32" id="edx-0G-MQS"/>
                 <constraint firstItem="Kzs-j2-9SX" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="efh-yn-eTj"/>
                 <constraint firstItem="BSZ-Y0-xj8" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="f35-4H-ZKd"/>
+                <constraint firstItem="BHA-OV-pZP" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="hBN-Bt-LwE"/>
                 <constraint firstAttribute="trailing" secondItem="BSZ-Y0-xj8" secondAttribute="trailing" constant="32" id="lFZ-E8-j1J"/>
                 <constraint firstAttribute="trailing" secondItem="J5R-ne-OXQ" secondAttribute="trailing" constant="32" id="oWp-aL-OyK"/>
                 <constraint firstAttribute="trailing" secondItem="Kzs-j2-9SX" secondAttribute="trailing" constant="32" id="uII-6B-l8y"/>