소스 검색

Merge branch 'develop' of git.kdan.cc:Mac_PDF/PDF_Office into develop

tangchao 1 년 전
부모
커밋
222ca8d815
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      PDF Office/PDF Office/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.swift

+ 13 - 1
PDF Office/PDF Office/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.swift

@@ -51,12 +51,14 @@ class KMResetPasswordView: KMBaseXibView {
         
         
         self.passwordTextField.delegate = self
+        self.passwordSecureTextField.delegate = self
         self.passwordTextField.onFocus = {
             self.passwordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
         }
         
         
         self.rePasswordTextField.delegate = self
+        self.rePasswordSecureTextField.delegate = self
         self.rePasswordTextField.onFocus = {
             self.rePasswordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
         }
@@ -87,7 +89,7 @@ class KMResetPasswordView: KMBaseXibView {
         
         self.rePasswordSecureTextField.textColor = NSColor(hex: "#252629")
         self.rePasswordSecureTextField.font = NSFont.SFProTextRegular(14.0)
-        self.passwordSecureTextField.border(NSColor(hex: "#FFFFFF"), 1, 0)
+        self.rePasswordSecureTextField.border(NSColor(hex: "#FFFFFF"), 1, 0)
         
         self.rePasswordAlertLabel.textColor = NSColor(hex: "#F3465B")
         self.rePasswordAlertLabel.font = NSFont.SFProTextRegular(12.0)
@@ -222,6 +224,16 @@ extension KMResetPasswordView: NSTextFieldDelegate {
             textField == self.rePasswordSecureTextField) {
             self.rePasswordContentView.border(NSColor(hex: "#DFE1E5"), 1, 4)
         }
+        
+        if (textField == self.passwordSecureTextField ||
+            textField == self.passwordTextField) {
+            self.presenter.changePassword(string: textField!.stringValue)
+        }
+        
+        if (textField == self.rePasswordSecureTextField ||
+            textField == self.rePasswordTextField) {
+            self.presenter.changeRePassword(string: textField!.stringValue)
+        }
     }
     
     func controlTextDidChange(_ obj: Notification) {