Browse Source

modify login

Marino Faggiana 8 years ago
parent
commit
81d64bd453

+ 5 - 3
iOSClient/Brand/CCNextcloudConstant.h

@@ -24,17 +24,19 @@
 #define _brand_                                         @"Nextcloud"
 #define _mail_me_                                       @"ios@nextcloud.com"
 #define _text_copyright_                                @"Nextcloud %@ © 2017 T.W.S. Inc."
+#define _login_base_url_                                @"https://cloud.twsweb.it"
 
 /* Define option compiler */
 
-#define NO_OFFLINE
-
 /*
  #define NO_MULTIUSER
+ #define NO_REQUEST_LOGIN_URL
  #define NO_CRYPTO_CLOUD_SYSTEM
  #define NO_OFFLINE
  #define MENU_BRAND
-*/
+ */
+
+#define NO_OFFLINE
 
 // -----------------------------------------------------------------------------------------------------------
 // COLOR

+ 6 - 0
iOSClient/Login/CCLogin.h

@@ -49,8 +49,14 @@ typedef enum {
 @property (nonatomic, weak) IBOutlet UITextField *user;
 @property (nonatomic, weak) IBOutlet UITextField *password;
 @property (nonatomic, weak) IBOutlet UITextField *baseUrl;
+
+@property (nonatomic, weak) IBOutlet UIImageView *imageBaseUrl;
+@property (nonatomic, weak) IBOutlet UIImageView *imageUser;
+@property (nonatomic, weak) IBOutlet UIImageView *imagePassword;
+
 @property (nonatomic, weak) IBOutlet UIImageView *loadingBaseUrl;
 
+
 @property (nonatomic, weak) IBOutlet UIButton *login;
 @property (nonatomic, weak) IBOutlet UIButton *annulla;
 @property (nonatomic, weak) IBOutlet UIButton *toggleVisiblePassword;

+ 9 - 5
iOSClient/Login/CCLogin.m

@@ -41,11 +41,11 @@
     
     self.imageBrand.image = [UIImage imageNamed:image_brandLogin];
     
-    if (app.activeAccount.length > 0) {
-        
-        self.baseUrl.text = app.activeUrl;
-        self.user.text = app.activeUser;
-    }
+#ifdef NO_REQUEST_LOGIN_URL
+    _baseUrl.text = _login_base_url_;
+    _imageBaseUrl.hidden = YES;
+    _baseUrl.hidden = YES;
+#endif
     
     [self.baseUrl setDelegate:self];
     [self.password setDelegate:self];
@@ -67,8 +67,12 @@
     }
     
     if (_loginType == loginModifyPasswordUser) {
+        
+        _baseUrl.text = app.activeUrl;
         _baseUrl.userInteractionEnabled = NO;
         _baseUrl.textColor = [UIColor lightGrayColor];
+        
+        _user.text = app.activeUser;
         _user.userInteractionEnabled = NO;
         _user.textColor = [UIColor lightGrayColor];
     }

+ 3 - 0
iOSClient/Login/CCLogin.storyboard

@@ -162,7 +162,10 @@
                     <connections>
                         <outlet property="annulla" destination="bSU-bn-DlO" id="30o-yK-jjV"/>
                         <outlet property="baseUrl" destination="szn-G7-5sK" id="syP-Ff-tfS"/>
+                        <outlet property="imageBaseUrl" destination="s9o-RX-XeS" id="Q81-S9-1P2"/>
                         <outlet property="imageBrand" destination="BpI-xK-1SU" id="0tB-69-RNs"/>
+                        <outlet property="imagePassword" destination="7q8-rl-x2M" id="Cr5-Te-Rkq"/>
+                        <outlet property="imageUser" destination="4OF-5u-Hd1" id="MJa-4H-w7m"/>
                         <outlet property="loadingBaseUrl" destination="oF7-f3-D2I" id="uel-s3-cAX"/>
                         <outlet property="login" destination="HQd-pF-3cE" id="dpI-ns-Ivh"/>
                         <outlet property="password" destination="jU7-Iw-XfU" id="OWi-V0-Eij"/>