소스 검색

【轻会员】重置密码界面,密码隐藏完善

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

+ 12 - 0
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)
         }
@@ -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) {