소스 검색

new weblogin

marinofaggiana 5 년 전
부모
커밋
8f096ca6f2
5개의 변경된 파일37개의 추가작업 그리고 38개의 파일을 삭제
  1. 1 1
      iOSClient/AppDelegate.h
  2. 29 29
      iOSClient/AppDelegate.m
  3. 5 5
      iOSClient/Login/CCLogin.m
  4. 1 1
      iOSClient/Login/CCLogin.storyboard
  5. 1 2
      iOSClient/Login/NCLoginWeb.swift

+ 1 - 1
iOSClient/AppDelegate.h

@@ -118,7 +118,7 @@
 @property (nonatomic, retain) CCSettings *activeSettings;
 @property (nonatomic, retain) CCTransfers *activeTransfers;
 @property (nonatomic, retain) CCLogin *activeLogin;
-@property (nonatomic, retain) CCLoginWeb *activeLoginWeb;
+@property (nonatomic, retain) NCLoginWeb *activeLoginWeb;
 @property (nonatomic, retain) CCMore *activeMore;
 @property (nonatomic, retain) NCOffline *activeOffline;
 

+ 29 - 29
iOSClient/AppDelegate.m

@@ -288,14 +288,14 @@ PKPushRegistry *pushRegistry;
             
             if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
                 
-                _activeLoginWeb = [CCLoginWeb new];
-                _activeLoginWeb.delegate = delegate;
-                _activeLoginWeb.loginType = loginType;
-                _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
-                
-                dispatch_async(dispatch_get_main_queue(), ^ {
-                    [_activeLoginWeb open:viewController];
-                });
+//                _activeLoginWeb = [CCLoginWeb new];
+//                _activeLoginWeb.delegate = delegate;
+//                _activeLoginWeb.loginType = loginType;
+//                _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
+//
+//                dispatch_async(dispatch_get_main_queue(), ^ {
+//                    [_activeLoginWeb open:viewController];
+//                });
             }
             return;
         }
@@ -314,31 +314,31 @@ PKPushRegistry *pushRegistry;
             
             if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
                 
-                _activeLoginWeb = [CCLoginWeb new];
-                _activeLoginWeb.delegate = delegate;
-                _activeLoginWeb.loginType = loginType;
-                
-                if (selector == k_intro_signup) {
-                    _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] linkloginPreferredProviders];
-                } else {
-                    _activeLoginWeb.urlBase = self.activeUrl;
-                }
-
-                dispatch_async(dispatch_get_main_queue(), ^ {
-                    [_activeLoginWeb open:viewController];
-                });
+//                _activeLoginWeb = [CCLoginWeb new];
+//                _activeLoginWeb.delegate = delegate;
+//                _activeLoginWeb.loginType = loginType;
+//
+//                if (selector == k_intro_signup) {
+//                    _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] linkloginPreferredProviders];
+//                } else {
+//                    _activeLoginWeb.urlBase = self.activeUrl;
+//                }
+//
+//                dispatch_async(dispatch_get_main_queue(), ^ {
+//                    [_activeLoginWeb open:viewController];
+//                });
             }
             
         } else if ([NCBrandOptions sharedInstance].disable_intro && [NCBrandOptions sharedInstance].disable_request_login_url) {
             
-            _activeLoginWeb = [CCLoginWeb new];
-            _activeLoginWeb.delegate = delegate;
-            _activeLoginWeb.loginType = loginType;
-            _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
-            
-            dispatch_async(dispatch_get_main_queue(), ^ {
-                [_activeLoginWeb open:viewController];
-            });
+//            _activeLoginWeb = [CCLoginWeb new];
+//            _activeLoginWeb.delegate = delegate;
+//            _activeLoginWeb.loginType = loginType;
+//            _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
+//            
+//            dispatch_async(dispatch_get_main_queue(), ^ {
+//                [_activeLoginWeb open:viewController];
+//            });
             
         } else {
             

+ 5 - 5
iOSClient/Login/CCLogin.m

@@ -191,12 +191,12 @@
             if (_user.hidden && _password.hidden && versionMajor >= k_flow_version_available) {
                 
 #ifdef DEBUG
-                NCLoginWeb *loginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
-                loginWeb.urlBase = self.baseUrl.text;
-                loginWeb.loginType = _loginType;
-                loginWeb.delegate = self;
+                appDelegate.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
+                appDelegate.activeLoginWeb.urlBase = self.baseUrl.text;
+                appDelegate.activeLoginWeb.loginType = _loginType;
+                appDelegate.activeLoginWeb.delegate = self;
                 
-                [self presentViewController:loginWeb animated:YES completion:nil];
+                [self presentViewController:appDelegate.activeLoginWeb animated:YES completion:nil];
 #else
                 appDelegate.activeLoginWeb = [CCLoginWeb new];
                 appDelegate.activeLoginWeb.loginType = _loginType;

+ 1 - 1
iOSClient/Login/CCLogin.storyboard

@@ -207,7 +207,7 @@
                                 </constraints>
                                 <state key="normal" image="exit"/>
                                 <connections>
-                                    <action selector="touchUpInsideButtonExit:" destination="yEb-Ky-35s" eventType="touchUpInside" id="Wx6-Nr-smX"/>
+                                    <action selector="touchUpInsideButtonExit:" destination="yEb-Ky-35s" eventType="touchUpInside" id="yOK-1Z-3bI"/>
                                 </connections>
                             </button>
                         </subviews>

+ 1 - 2
iOSClient/Login/NCLoginWeb.swift

@@ -58,7 +58,7 @@ class NCLoginWeb: UIViewController {
         }
         
         // button exit
-        buttonExit.layer.zPosition = .greatestFiniteMagnitude
+        self.view.bringSubviewToFront(buttonExit)
         if loginType == k_login_Add_Forced {
             buttonExit.isHidden = true
         }
@@ -79,7 +79,6 @@ class NCLoginWeb: UIViewController {
     }
     
     @IBAction func touchUpInsideButtonExit(_ sender: UIButton) {
-        
         self.dismiss(animated: true) {
             self.delegate?.webDismiss?()
         }