From 634190d1f909645815a89035450ddd5af41baf38 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 14 Jul 2015 14:00:29 +0300 Subject: [PATCH] Better messaging when creating a user on the landing page Fixes #230 --- static/css/directives/ui/signup-form.css | 7 +++++++ static/css/quay.css | 2 +- static/directives/signup-form.html | 12 +++++------- static/js/directives/ui/signup-form.js | 6 +++--- static/js/pages/landing.js | 5 +++++ static/partials/landing-normal.html | 8 +++++++- 6 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 static/css/directives/ui/signup-form.css diff --git a/static/css/directives/ui/signup-form.css b/static/css/directives/ui/signup-form.css new file mode 100644 index 000000000..5a3dede2f --- /dev/null +++ b/static/css/directives/ui/signup-form.css @@ -0,0 +1,7 @@ +.signup-form-element { + position: relative; +} + +.signup-form-element .co-alert { + color: black; +} \ No newline at end of file diff --git a/static/css/quay.css b/static/css/quay.css index 69adefbf4..67b308f06 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -1238,7 +1238,7 @@ i.toggle-icon:hover { color: white; margin-bottom: 0px; - padding-top: 120px; + padding-top: 40px; min-height: 440px; } diff --git a/static/directives/signup-form.html b/static/directives/signup-form.html index 129ec3250..27561f327 100644 --- a/static/directives/signup-form.html +++ b/static/directives/signup-form.html @@ -23,12 +23,10 @@
-
-
-
-
-
- Thank you for registering! We have sent you an activation email. - You must verify your email address before you can continue.
+
+
+ Thank you for registering! We have sent you an activation email. + You must verify your email address before you can continue.
diff --git a/static/js/directives/ui/signup-form.js b/static/js/directives/ui/signup-form.js index 32981a565..33e049d3d 100644 --- a/static/js/directives/ui/signup-form.js +++ b/static/js/directives/ui/signup-form.js @@ -10,7 +10,7 @@ angular.module('quay').directive('signupForm', function () { restrict: 'C', scope: { 'inviteCode': '=inviteCode', - + 'hideRegisteredMessage': '@hideRegisteredMessage', 'userRegistered': '&userRegistered' }, controller: function($scope, $location, $timeout, ApiService, KeyService, UserService, Config, UIService) { @@ -35,11 +35,11 @@ angular.module('quay').directive('signupForm', function () { mixpanel.alias($scope.newUser.username); } - $scope.userRegistered({'username': $scope.newUser.username}); - if (!$scope.awaitingConfirmation) { document.location = '/'; } + + $scope.userRegistered({'username': $scope.newUser.username}); }, function(result) { $scope.registering = false; UIService.showFormError('#signupButton', result); diff --git a/static/js/pages/landing.js b/static/js/pages/landing.js index beca5501e..c92447533 100644 --- a/static/js/pages/landing.js +++ b/static/js/pages/landing.js @@ -12,6 +12,7 @@ function LandingCtrl($scope, $location, UserService, ApiService, Features, Config) { $scope.namespace = null; $scope.currentScreenshot = 'repo-view'; + $scope.userRegistered = false; $scope.$watch('namespace', function(namespace) { loadMyRepos(namespace); @@ -26,6 +27,10 @@ loadMyRepos($scope.namespace); }); + $scope.handleUserRegistered = function() { + $scope.userRegistered = true; + }; + $scope.changeScreenshot = function(screenshot) { $scope.currentScreenshot = screenshot; }; diff --git a/static/partials/landing-normal.html b/static/partials/landing-normal.html index e7d6f2b61..a6ee0966f 100644 --- a/static/partials/landing-normal.html +++ b/static/partials/landing-normal.html @@ -2,6 +2,11 @@
+
+ Thank you for registering! We have sent you an activation email. + You must verify your email address before you can continue. +
+
@@ -43,7 +48,8 @@
- +