Marino Faggiana před 6 roky
rodič
revize
0d33c488df

+ 1 - 1
iOSClient/AppDelegate.m

@@ -361,7 +361,7 @@
                 _activeLoginWeb.loginType = loginType;
                 
                 if (selector == k_intro_signup) {
-                    _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginPreferredProviders];
+                    _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] linkloginPreferredProviders];
                 } else {
                     _activeLoginWeb.urlBase = self.activeUrl;
                 }

+ 24 - 5
iOSClient/Brand/Intro/CCIntro.m

@@ -76,6 +76,11 @@
     [self.intro hideWithFadeOutDuration:0.7];
 }
 
+- (void)host:(id)sender
+{
+    
+}
+
 - (void)show
 {
     [self showIntro];
@@ -89,17 +94,19 @@
     
     if (height <= 568) {
         titleIconPositionY = 20;
+        titlePositionY = height / 2 + 40.0;
+        descPositionY  = height / 2;
+        buttonPosition = height / 2 + 50.0;
     } else {
         titleIconPositionY = 100;
+        titlePositionY = height / 2 + 40.0;
+        descPositionY  = height / 2;
+        buttonPosition = height / 2 + 120.0;
     }
     
-    titlePositionY = height / 2 + 40.0;
-    descPositionY  = height / 2;
-    buttonPosition = height / 2 + 120.0;
-    
     // Button
     
-    UIView *buttonView = [[UIView alloc] initWithFrame:CGRectMake(0,0, self.rootView.bounds.size.width, 100.0)];
+    UIView *buttonView = [[UIView alloc] initWithFrame:CGRectMake(0,0,self.rootView.bounds.size.width,220)];
     buttonView.userInteractionEnabled = YES ;
     
     UIButton *buttonLogin = [UIButton buttonWithType:UIButtonTypeRoundedRect];
@@ -126,6 +133,18 @@
         
     [buttonView addSubview:buttonSignUp];
     
+    UIButton *buttonHost = [UIButton buttonWithType:UIButtonTypeRoundedRect];
+    buttonHost.frame = CGRectMake(50.0, 200.0, width - 100.0, 20.0);
+    buttonHost.layer.cornerRadius = 3;
+    buttonHost.clipsToBounds = YES;
+    [buttonHost setTitle:NSLocalizedStringFromTable(@"_host_your_own_server", @"Intro", nil) forState:UIControlStateNormal];
+    buttonHost.titleLabel.font = [UIFont systemFontOfSize:14];
+    [buttonHost setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
+    buttonHost.backgroundColor = [UIColor clearColor];
+    [buttonHost addTarget:self action:@selector(host:) forControlEvents:UIControlEventTouchDown];
+    
+    [buttonView addSubview:buttonHost];
+    
     // Pages
     
     EAIntroPage *page1 = [EAIntroPage page];

+ 2 - 2
iOSClient/Brand/NCBrand.swift

@@ -74,9 +74,9 @@ class NCBrandColor: NSObject {
     @objc public let textCopyrightNextcloudiOS:         String = "Nextcloud for iOS %@ © 2018 T.W.S. Inc."
     @objc public let textCopyrightNextcloudServer:      String = "Nextcloud Server %@"
     @objc public let loginBaseUrl:                      String = "https://cloud.twsweb.it"
-    @objc public let loginPreferredProviders:           String = "https://nextcloud.com/signup";
     @objc public let pushNotificationServerProxy:       String = "https://push-notifications.nextcloud.com"
-    @objc public let linkLoginProvider:                 String = "https://nextcloud.com/providers"
+    @objc public let linkLoginHost:                     String = "https://nextcloud.com/install"
+    @objc public let linkloginPreferredProviders:       String = "https://nextcloud.com/signup";
     @objc public let textLoginProvider:                 String = "_login_bottom_label_"
     @objc public let middlewarePingUrl:                 String = ""
     @objc public let webLoginAutenticationProtocol:     String = "nc://"                                            // example "abc://"

+ 1 - 1
iOSClient/Login/CCLoginWeb.swift

@@ -48,7 +48,7 @@ public class CCLoginWeb: UIViewController {
         }
         
         // ADD k_flowEndpoint for Web Flow
-        if (NCBrandOptions.sharedInstance.use_login_web_personalized == false && urlBase != NCBrandOptions.sharedInstance.loginPreferredProviders) {
+        if (NCBrandOptions.sharedInstance.use_login_web_personalized == false && urlBase != NCBrandOptions.sharedInstance.linkloginPreferredProviders) {
             urlString =  urlBase+k_flowEndpoint
         }